A production-ready Docker Compose configuration for deploying Flagsmith (feature flag management platform) on Coolify with automatic SSL, database, and email support.
✅ Automatic password generation for PostgreSQL and Django
✅ GitHub OAuth integration
✅ Email notifications via SMTP (Resend)
✅ Task processor for background jobs
✅ Automatic domain and SSL certificate management
✅ Postgres data persistence
-
Upload this docker-compose.yml to Coolify as a new Service Stack
-
Configure Environment Variables in Coolify UI:
GITHUB_CLIENT_ID
- Your GitHub OAuth Client IDGITHUB_CLIENT_SECRET
- Your GitHub OAuth Client Secret (mark as secret)EMAIL_HOST
- SMTP host (e.g., smtp.resend.com)SENDER_EMAIL
- Email address for sending emailsEMAIL_HOST_USER
- SMTP usernameEMAIL_HOST_PASSWORD
- SMTP password (mark as secret)EMAIL_PORT
- Optional, defaults to 587EMAIL_USE_TLS
- Optional, defaults to true
-
🚨 IMPORTANT: Configure Domain for Flagsmith Service
- Click on the "Flagsmith" service in your Service Stack
- In the "Domains" field, either:
- Click "Generate Domain" to auto-generate a random subdomain
- Or manually enter your domain:
https://your-subdomain.yourdomain.com
- Click "Save"
- This step is REQUIRED for Coolify to generate
COOLIFY_FQDN
and expose the service publicly
-
Deploy and wait for all services to start
Coolify automatically generates and manages:
SERVICE_PASSWORD_POSTGRES
- Secure 64-character PostgreSQL passwordSERVICE_PASSWORD_DJANGO
- Secure 64-character Django secret keyCOOLIFY_FQDN
- Your generated domain (after you configure it in step 3)
- postgres - PostgreSQL 15.5 database with persistent storage
- flagsmith - Main Flagsmith application (publicly exposed)
- flagsmith-task-processor - Background task processor
COOLIFY_FQDN
won't be generated.
🔒 All sensitive variables are automatically encrypted by Coolify when marked as secrets.
📝 After deployment, update DJANGO_ALLOWED_HOSTS
in production to your specific domain instead of '*'
.
After deployment and domain configuration, access Flagsmith at the generated URL shown in your Coolify Service Stack.