52 lines
849 B
Plaintext
52 lines
849 B
Plaintext
services:
|
|
web:
|
|
build: ./web
|
|
command: >
|
|
sh -c "
|
|
python manage.py collectstatic --noinput
|
|
daphne -b 0.0.0.0 -p 8000 app.asgi:application
|
|
"
|
|
volumes:
|
|
- .:/app
|
|
- ./media:/app/media
|
|
- ./static:/app/staticfiles
|
|
|
|
ports:
|
|
- '8000:8000'
|
|
expose:
|
|
- 8000
|
|
depends_on:
|
|
- redis
|
|
|
|
restart: always
|
|
|
|
nginx:
|
|
build: ./nginx
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./static:/app/static
|
|
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
|
|
depends_on:
|
|
- web
|
|
|
|
restart: always
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6378:6378"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
redis_data:
|
|
|