From d274d25c2da31fd6cf5b8a86f81d9d79c4545e8c Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Wed, 3 Feb 2021 12:12:20 -0800 Subject: 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. --- docker-compose.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'docker-compose.yml') 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: -- cgit v1.2.3