mirror of
https://github.com/thecyberlearn/modern-django-starter.git
synced 2026-08-18 12:12:54 +00:00
Based on DOKPLOY.md documentation: - Update Traefik router/service names to be unique (dt-netcoptech-prod) - This prevents conflicts with other services on the same Dokploy server - Add alternative compose file without Traefik labels for Domain UI method - Both approaches should resolve port/routing issues Try Method A first (current file), then Method B if needed.
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
services:
|
|
web:
|
|
build:
|
|
context: .
|
|
target: production
|
|
args:
|
|
- BUILDKIT_INLINE_CACHE=1
|
|
command: >
|
|
sh -c "chmod +x /app/entrypoint.sh &&
|
|
/app/entrypoint.sh &&
|
|
gunicorn --bind 0.0.0.0:8000 --workers 3 django_project.wsgi:application"
|
|
volumes:
|
|
- "../files/staticfiles:/app/staticfiles"
|
|
- "../files/media:/app/media"
|
|
expose:
|
|
- 8000
|
|
env_file:
|
|
- .env
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
environment:
|
|
- DJANGO_SETTINGS_MODULE=django_project.settings.production
|
|
networks:
|
|
- dokploy-network
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
volumes:
|
|
- "../files/postgres_data:/var/lib/postgresql/data/"
|
|
environment:
|
|
- POSTGRES_DB=${DB_NAME:-django_db}
|
|
- POSTGRES_USER=${DB_USER:-django_user}
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-django_password}
|
|
networks:
|
|
- dokploy-network
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
volumes:
|
|
- "../files/redis_data:/data"
|
|
networks:
|
|
- dokploy-network
|
|
|
|
networks:
|
|
dokploy-network:
|
|
external: true
|