docker-compose.save

This commit is contained in:
za_litvu 2025-05-26 20:55:11 +07:00
parent 12ce0ae921
commit 75cb02cbde

51
docker-compose.yaml.save Normal file
View File

@ -0,0 +1,51 @@
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: