Files
shopback/docker-compose.prod.yml
Beyhan Oğur d9f1ea341e first commit
2026-04-26 22:27:56 +03:00

94 lines
2.7 KiB
YAML
Raw Permalink 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-shop:
build: .
container_name: django_web_prod_shop
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.sqlite3:/app/db.sqlite3
expose:
- 8000
ports:
- "8800:8000"
networks:
- dokploy-network
environment:
- DEBUG=0
- SECRET_KEY=${SECRET_KEY}
- USE_POSTGRES=True
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST=${POSTGRES_HOST:-10.80.80.50}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- 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-shop:
build: .
container_name: django_celery_prod_shop
entrypoint: ["/app/entrypoint-celery.sh"]
command: celery -A core worker --loglevel=info
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- media_volume:/app/media
- ./db.sqlite3:/app/db.sqlite3
networks:
- dokploy-network
environment:
- DEBUG=0
- SECRET_KEY=${SECRET_KEY}
- USE_POSTGRES=True
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_HOST=${POSTGRES_HOST:-10.80.80.50}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- 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-shop
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: django_nginx_shop
ports:
- "8077:80"
networks:
- dokploy-network
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./db.sqlite3:/app/db.sqlite3
- static_volume:/app/staticfiles:ro
- media_volume:/app/media:ro
depends_on:
- web-shop
restart: unless-stopped
volumes:
static_volume:
media_volume:
networks:
dokploy-network:
external: true