From fe48a65c83e31928561bf22a14b3d66c8185a46f Mon Sep 17 00:00:00 2001 From: Sathyajith Bhat Date: Sun, 8 Mar 2020 15:21:48 +0200 Subject: [PATCH] Streamline Docker (#112) * Add git to Docker image * Bind mount /data for persistence --- Dockerfile | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73fd96d..04855c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM node:alpine COPY . /app WORKDIR /app -RUN npm install +RUN apk add git && npm install CMD npm start diff --git a/README.md b/README.md index 4d49201..3746f40 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ You need to have [docker](https://docs.docker.com/engine/installation/linux/dock 2. Clone this repository or [download zip](https://github.com/TheDevs-Network/the-guard-bot/archive/master.zip). 3. Copy `example.config.js` to `config.js` and edit it. 4. Run `docker build -t the_guard_bot .` to build image. -5. Run `docker run --rm -itd the_guard_bot` to start the bot. +5. Run `docker run -v $(pwd)/data:/app/data --rm -itd the_guard_bot` to start the bot. Now you can add the bot as **administrator** to your groups.