modern-django-starter/dokploy.json
amitrana01 31ab604b7c Add CSRF_TRUSTED_ORIGINS support for domain configuration
- Add CSRF_TRUSTED_ORIGINS setting to read from environment variable
- Update docker-compose.dokploy.yml with correct domain dt.netcoptech.com
- Update dokploy.json with proper domain configuration
- Fix 500 error by supporting CSRF trusted origins for production domains
2025-09-11 18:02:06 +05:30

148 lines
3.5 KiB
JSON

{
"name": "django-template",
"description": "Django boilerplate with authentication and Docker support",
"type": "application",
"buildType": "dockerfile",
"dockerfile": "Dockerfile",
"buildArgs": {
"TARGET": "production"
},
"env": [
{
"key": "SECRET_KEY",
"value": "your-production-secret-key-here",
"description": "Django secret key for production"
},
{
"key": "DEBUG",
"value": "False",
"description": "Set to False in production"
},
{
"key": "ALLOWED_HOSTS",
"value": "dt.netcoptech.com,localhost,127.0.0.1",
"description": "Comma-separated list of allowed hosts"
},
{
"key": "CSRF_TRUSTED_ORIGINS",
"value": "https://dt.netcoptech.com",
"description": "CSRF trusted origins for production"
},
{
"key": "DB_NAME",
"value": "django_db",
"description": "PostgreSQL database name"
},
{
"key": "DB_USER",
"value": "django_user",
"description": "PostgreSQL database user"
},
{
"key": "DB_PASSWORD",
"value": "secure_password_here",
"description": "PostgreSQL database password"
},
{
"key": "DB_HOST",
"value": "db",
"description": "PostgreSQL database host"
},
{
"key": "DB_PORT",
"value": "5432",
"description": "PostgreSQL database port"
},
{
"key": "EMAIL_BACKEND",
"value": "django.core.mail.backends.smtp.EmailBackend",
"description": "Email backend for production"
},
{
"key": "EMAIL_HOST",
"value": "smtp.gmail.com",
"description": "SMTP server host"
},
{
"key": "EMAIL_PORT",
"value": "587",
"description": "SMTP server port"
},
{
"key": "EMAIL_USE_TLS",
"value": "True",
"description": "Use TLS for email"
},
{
"key": "EMAIL_HOST_USER",
"value": "your-email@gmail.com",
"description": "Email account username"
},
{
"key": "EMAIL_HOST_PASSWORD",
"value": "your-app-password",
"description": "Email account password or app password"
},
{
"key": "DEFAULT_FROM_EMAIL",
"value": "noreply@your-domain.com",
"description": "Default from email address"
},
{
"key": "GOOGLE_OAUTH2_CLIENT_ID",
"value": "your-google-client-id",
"description": "Google OAuth2 client ID"
},
{
"key": "GOOGLE_OAUTH2_CLIENT_SECRET",
"value": "your-google-client-secret",
"description": "Google OAuth2 client secret"
},
{
"key": "FACEBOOK_APP_ID",
"value": "your-facebook-app-id",
"description": "Facebook app ID"
},
{
"key": "FACEBOOK_APP_SECRET",
"value": "your-facebook-app-secret",
"description": "Facebook app secret"
},
{
"key": "SECURE_SSL_REDIRECT",
"value": "True",
"description": "Force HTTPS redirects in production"
}
],
"ports": [
{
"containerPort": 8000,
"hostPort": 80,
"protocol": "tcp"
}
],
"volumes": [
{
"name": "static_files",
"mountPath": "/app/staticfiles"
},
{
"name": "media_files",
"mountPath": "/app/media"
}
],
"healthCheck": {
"path": "/",
"port": 8000,
"interval": 30,
"timeout": 10,
"retries": 3
},
"database": {
"type": "postgresql",
"version": "15",
"name": "django_db",
"username": "django_user",
"password": "secure_password_here"
}
}