diff --git a/README.md b/README.md index 915381f..4eb9c8a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ autogen enables or disables the bot's automatic production of homebrew content. Example `docker run`: ```bash -docker run -d -v /path/to/.env:/data/.env docker.askiiart.net/askiiart/discord-always-dungeons +docker run -d --env-file /path/to/.env docker.askiiart.net/askiiart/discord-always-dungeons ``` Example `docker-compose.yml`: @@ -62,8 +62,8 @@ version: '3.7' services: hugo: image: docker.askiiart.net/askiiart/discord-always-dungeons - volumes: - - /path/to/.env:/data/.env + env_file: + - /path/to/.env ``` ## Build the Docker image @@ -75,4 +75,12 @@ git apply docker.patch docker build . ``` +## Run the dev image + +This image is built for development. It mounts the current directory to /data, installs all the dependencies, and runs the bot from there. Keep in mind this runs differently than the production image. It uses load_dotenv, not `--env-file`. + +```bash +docker run -v .:/data docker.askiiart.net/askiiart/always-dungeons-testing +``` + Alternatively, you can just run `./build-and-push.sh`, which will apply the patch, build the image, and push it to the registry. Just make sure to fix the variables before running it. diff --git a/testing/Dockerfile b/dev-image/Dockerfile similarity index 100% rename from testing/Dockerfile rename to dev-image/Dockerfile diff --git a/testing/run.sh b/dev-image/run.sh similarity index 75% rename from testing/run.sh rename to dev-image/run.sh index e430186..f2d8250 100755 --- a/testing/run.sh +++ b/dev-image/run.sh @@ -1,6 +1,5 @@ #!/bin/bash set -e -git clone https://github.com/7trail/AlwaysDungeons pip3 install -r /data/AlwaysDungeons/requirements.txt cp /data/.env /data/AlwaysDungeons/.env cd /data/AlwaysDungeons