Coolify Production Deployment
Coolify is a self-hosted PaaS that simplifies Docker-based deployments. Quark Commerce is optimized for Coolify's docker-compose workflow.
Setup Steps
1. Create a New Resource
In Coolify, create a new resource of type Docker Compose. Point it to your Git repository containing the docker-compose.yml.
2. Configure Volumes
In the Coolify Storage tab, ensure these volumes are defined:
| Volume | Mount Path | Purpose |
|---|---|---|
api_media | /app/wwwroot/media | Media files (images, documents) |
For docker-compose based apps in Coolify, volumes are read-only in the dashboard. They must be defined in the compose file itself. After modifying docker-compose.yml, reload the configuration in Coolify.
3. Set Environment Variables
In the Coolify Environment Variables tab:
# Database
ConnectionStrings__DefaultConnection=Host=your-db-host;Port=5432;Database=HeadlessEcommerce;Username=postgres;Password=your-secure-password
# RabbitMQ (use service name if in same compose)
RabbitMQ__Host=rabbitmq
RabbitMQ__Port=5672
RabbitMQ__Username=guest
RabbitMQ__Password=guest
# JWT — use a strong random key (min 32 chars)
Jwt__SecretKey=your-production-jwt-secret-minimum-32-characters
# Licensing
Licensing__PublicKeyBase64=your-base64-encoded-rsa-public-key
Licensing__LicenseFileBase64=your-base64-encoded-license-file
# Storage — must match your public domain
Storage__BaseUrl=https://quarkapi.yourdomain.com/media
# Payment Providers (optional)
Stripe__SecretKey=sk_live_...
Iyzico__ApiKey=...
Iyzico__SecretKey=...
# Notifications (optional)
# Configured via Backoffice Settings UI
4. Configure Domain & HTTPS
In Coolify's Settings tab:
- Set your custom domain (e.g.,
quarkapi.yourdomain.com) - Enable HTTPS (Coolify handles Let's Encrypt automatically)
5. CORS Configuration
The API reads allowed origins from appsettings.Production.json. Ensure your storefront and backoffice domains are listed:
{
"AllowedCorsOrigins": [
"https://store.yourdomain.com",
"https://admin.yourdomain.com"
]
}
Or set via environment variable:
AllowedCorsOrigins__0=https://store.yourdomain.com
AllowedCorsOrigins__1=https://admin.yourdomain.com
Deploying Frontends
Backoffice Panel
The Backoffice is a static Angular build (included with Quark Commerce). Deploy it as a separate Coolify resource:
- Build:
npm run build -- --configuration production - Output:
dist/folder - Deploy as a static site or via Nginx container
- Set
environment.apiUrlto your production API URL (e.g.,https://quarkapi.yourdomain.com/api)
Storefront (Customer-Built)
The Storefront is not included — customers build their own using any tech stack (React, Vue, Angular, Next.js, mobile apps, etc.) against the Storefront API. Deployment depends on the chosen framework.
Monitoring
- Health check:
GET /health— returns200 OKif the API is operational - Swagger:
GET /swagger— API documentation (consider restricting in production) - RabbitMQ Management: Port
15672— monitor message queues and event delivery - Outbox Monitor: Available in the Backoffice under Settings → Event System