aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorGravatar MarkKoz <[email protected]>2021-02-03 12:12:20 -0800
committerGravatar MarkKoz <[email protected]>2021-02-04 16:19:45 -0800
commitd274d25c2da31fd6cf5b8a86f81d9d79c4545e8c (patch)
tree95fee110c8c7071c875e7db9bda22a068d9830e6 /docker-compose.yml
parentCategorise and sort scripts in Pipfile (diff)
Replace dev.sh with Docker Compose
Managing development containers through Docker Compose is convenient. However, it isn't quite flexible enough to facilitate both development and normal use. It's not really worth accommodating the latter since the container gets pushed to a registry and that's the intended way to run the service. Anyone that is checking out the repository and therefore has access to the compose file is likely a developer, not a user.
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml15
1 files changed, 13 insertions, 2 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
index a7747a6..d073dd1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,17 +2,28 @@ version: "3.7"
services:
snekbox:
- container_name: snekbox
+ container_name: snekbox_dev
+ hostname: snekbox_dev
privileged: true
- image: ghcr.io/python-discord/snekbox:latest
+ image: ghcr.io/python-discord/snekbox:dev
ports:
- 8060:8060
init: true
ipc: none
+ working_dir: $PWD
+ environment:
+ DEBUG: 1
+ PIPENV_PIPFILE: /snekbox/Pipfile
+ PYTHONDONTWRITEBYTECODE: 1
build:
context: .
dockerfile: Dockerfile
+ args:
+ DEV: 1
+ cache_from:
+ - ghcr.io/python-discord/snekbox:latest
volumes:
+ - $PWD:$PWD
- user-base:/snekbox/user_base
volumes: