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.0 KiB

version: '3.8'
services:
web:
container_name: imam-javad_web
restart: unless-stopped
build:
context: .
dockerfile: Dockerfile.prod
command: gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers=6 --timeout 560
volumes:
# - static_volume:/usr/src/app/static
- media_volume:/usr/src/app/media
- staticfiles_volume:/usr/src/app/staticfiles
ports:
- "8024:8000"
env_file:
- .env.prod
depends_on:
- postgres
links:
- postgres
networks:
- imam-javad
postgres:
container_name: imam-javad_db
ports:
- "5513:5432"
restart: unless-stopped
image: postgres:14.0
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env.prod
networks:
- imam-javad
imam-javad_redis:
container_name: imam-javad_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:
imam-javad:
driver: bridge