mirror of
https://github.com/thecyberlearn/modern-django-starter.git
synced 2026-08-18 08:52:55 +00:00
Based on analysis of successfully deployed project: - Create docker-compose.dokploy-simple.yml with ports instead of expose - Remove complex Traefik labels (let Dokploy handle routing via Domain UI) - Hardcode environment variables in compose file - Run migrations in the command directly - Add Dockerfile.simple following their working multi-stage pattern - Includes Tailwind build and health check Use docker-compose.dokploy-simple.yml and configure domain via Dokploy UI
22 lines
870 B
YAML
22 lines
870 B
YAML
services:
|
|
web:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- DEBUG=False
|
|
- ALLOWED_HOSTS=dt.netcoptech.com,localhost,127.0.0.1
|
|
- DATABASE_URL=${DATABASE_URL}
|
|
- SECRET_KEY=${SECRET_KEY}
|
|
- DJANGO_SETTINGS_MODULE=django_project.settings.production
|
|
- CSRF_TRUSTED_ORIGINS=https://dt.netcoptech.com
|
|
- SECURE_SSL_REDIRECT=True
|
|
- GOOGLE_OAUTH2_CLIENT_ID=${GOOGLE_OAUTH2_CLIENT_ID:-demo-google-client-id}
|
|
- GOOGLE_OAUTH2_CLIENT_SECRET=${GOOGLE_OAUTH2_CLIENT_SECRET:-demo-google-client-secret}
|
|
command: >
|
|
sh -c "python manage.py migrate &&
|
|
python manage.py create_groups &&
|
|
python manage.py setup_social_apps &&
|
|
python manage.py collectstatic --noinput &&
|
|
gunicorn --bind 0.0.0.0:8000 --workers 3 --timeout 120 django_project.wsgi:application"
|