You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

91 lines
2.1 KiB

version: '3.8'
services:
web:
container_name: dovodi_web
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.prod
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers=2 --threads=2 --max-requests=1000 --max-requests-jitter=100 --timeout 180
volumes:
# - static_volume:/usr/src/app/static
- media_volume:/usr/src/app/media
- staticfiles_volume:/usr/src/app/staticfiles
ports:
- "127.0.0.1:8024:8000"
env_file:
- .env.prod
depends_on:
- postgres
links:
- postgres
networks:
- backend_imam-javad
postgres:
container_name: dovodi_db
ports:
- "5513:5432"
restart: unless-stopped
image: postgres:14.0
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env.prod
networks:
- backend_imam-javad
# dovodi_redis:
# container_name: dovodi_redis
# image: redis:alpine
# env_file: .env.prod
# volumes:
# - redis_data:/data
# networks:
# - imam-javad
# imam-javad_celery:
# container_name: imam-javad_celery
# build:
# context: .
# dockerfile: Dockerfile.prod
# env_file: .env.prod
# command: celery -A config worker -l info
# volumes:
# # - .:/usr/src/app/
# - staticfiles_volume:/usr/src/app/staticfiles
# - media_volume:/usr/src/app/media
# - logs_volume:/usr/src/app/logs
# depends_on:
# - imam-javad_redis
# networks:
# - imam-javad
# imam-javad_celery-beat:
# container_name: imam-javad_celery_beat
# build:
# context: .
# dockerfile: Dockerfile.prod
# env_file: .env.prod
# command: celery -A config beat -l info
# volumes:
# # - .:/usr/src/app/
# - logs_volume:/usr/src/app/logs
# depends_on:
# - imam-javad_redis
# networks:
# - imam-javad
volumes:
staticfiles_volume: # Volume برای فایل‌های static
media_volume:
postgres_data: # static_volume:
# redis_data:
networks:
backend_imam-javad:
external: true