fix: local docker-compose setup
parent
061a99e77e
commit
919dd33373
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue