50 lines
813 B
YAML
50 lines
813 B
YAML
services:
|
|
web:
|
|
build: ./web
|
|
volumes:
|
|
- .:/app
|
|
- ./media:/app/media
|
|
- ./static:/app/staticfiles
|
|
# - ./media:/app/media
|
|
ports:
|
|
- "8000:8000"
|
|
depends_on:
|
|
- redis
|
|
|
|
restart: always
|
|
|
|
nginx:
|
|
build: ./nginx
|
|
# image: nginx:latest
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
|
|
- ./static:/app/static
|
|
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf
|
|
depends_on:
|
|
- web
|
|
|
|
restart: always
|
|
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
|
|
volumes:
|
|
- redis_data:/data
|
|
ports:
|
|
- "6379:6379"
|
|
healthcheck:
|
|
test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ]
|
|
interval: 1s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
restart: always
|
|
|
|
volumes:
|
|
redis_data:
|
|
|