Files
atabackend/docker-compose.prod.yml
Beyhan Oğur d50f14bcb1 first commit
2026-04-26 22:20:45 +03:00

87 lines
2.3 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
web-atahan:
build: .
container_name: web-ata
command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- static_volume:/app/staticfiles
- media_volume:/app/media
- db_volume:/app/data
expose:
- 8000
ports:
- "8800:8000"
networks:
- dokploy-network
environment:
- DEBUG=0
- SECRET_KEY=${SECRET_KEY}
- USE_POSTGRES=False
- SQLITE_DB_PATH=/app/data/db.sqlite3
- POSTGRES_DB=${POSTGRES_DB}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
# Celery ayarları
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND:-django-db}
# Email Settings (Optional)
- EMAIL_BACKEND=${EMAIL_BACKEND:-django.core.mail.backends.smtp.EmailBackend}
- EMAIL_HOST=${EMAIL_HOST:-pit.beyhan.gen.tr}
- EMAIL_PORT=${EMAIL_PORT:-1025}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- EMAIL_USE_TLS=${EMAIL_USE_TLS:-False}
- EMAIL_USE_SSL=${EMAIL_USE_SSL:-True}
- DEFAULT_FROM_EMAIL=${DEFAULT_FROM_EMAIL:-noreply@localhost}
restart: unless-stopped
celery-atahan:
build: .
container_name: django_celery_prod_atahan
entrypoint: [ "/app/entrypoint-celery.sh" ]
command: celery -A core worker --loglevel=info
dns:
- 8.8.8.8
volumes:
- media_volume:/app/media
- db_volume:/app/data
networks:
- dokploy-network
environment:
- DEBUG=0
- SECRET_KEY=${SECRET_KEY}
- USE_POSTGRES=False
- SQLITE_DB_PATH=/app/data/db.sqlite3
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
# Celery ayarları
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND:-django-db}
depends_on:
- web-atahan
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: django_nginx_atahan
ports:
- "8077:80"
networks:
- dokploy-network
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- static_volume:/app/staticfiles:ro
- media_volume:/app/media:ro
depends_on:
- web-atahan
restart: unless-stopped
volumes:
static_volume:
media_volume:
db_volume:
networks:
dokploy-network:
external: true