From 919dd333736ce208c9177da0e91b6039d8b23394 Mon Sep 17 00:00:00 2001 From: Simon Caminada Date: Wed, 29 Jun 2022 12:40:27 +0200 Subject: [PATCH] fix: local docker-compose setup --- docker-compose.yml | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8a27071..b835690 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,40 +1,21 @@ version: '3' services: - nginx: - image: nginx:1.16-alpine - restart: unless-stopped - volumes: - - ./docker/conf/nginx:/etc/nginx/conf.d - - ./docker/static_collected:/app/static_collected - - ${MEDIA_DIR}:/app/data/media - ports: - - ${HTTP_PORT}:80 - #command: "/bin/sh -c 'while :; do sleep 1m & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" - depends_on: - - web - network_mode: bridge - links: - - web web: - restart: unless-stopped build: "." links: - "db:postgres" + ports: + - "8007:80" volumes: - - .:/app:rw - - ${DATA_DIR}:/data:rw - - ${STATIC_DIR}:/app/static_collected - - ${MEDIA_DIR}:/app/data/media - network_mode: bridge - command: "/bin/sh -c '/app/wait-for-postgres.sh postgres /app/run.sh'" + - ".:/app:rw" + - "./data:/data:rw" + command: python manage.py runserver 0.0.0.0:80 env_file: - ./.env db: - restart: unless-stopped image: postgres:9.6-alpine env_file: - ./.env-db volumes: - - ${POSTGRES_DATA_DIR}:/var/lib/postgresql/data:rw - network_mode: bridge + - ".:/app:rw"