Prefer a Dokploy `Application` instead of a Compose service.
Dokploy supports Dockerfile-based applications directly, which fits this API better than maintaining a dedicated compose wrapper. Configure the application like this:
- Build Type: `Dockerfile`
- Dockerfile Path: `apps/api/Dockerfile`
- Docker Context Path: `.`
- Docker Build Stage: `final`
- Port: `8080`
- Run Command: leave empty and use the image `CMD`
Set these Dokploy environment variables:
-`NODE_ENV`
-`DD_SERVICE=xtablo-api`
-`DD_ENV`
-`DD_VERSION`
-`DD_LOGS_INJECTION=true`
-`SUPABASE_URL`
-`SUPABASE_SERVICE_ROLE_KEY`
-`SUPABASE_CONNECTION_STRING`
-`SUPABASE_CA_CERT`
-`STRIPE_SECRET_KEY`
-`STRIPE_WEBHOOK_SECRET`
-`STRIPE_SOLO_PRICE_ID`
-`STRIPE_TEAM_PRICE_ID`
-`STRIPE_FOUNDER_PRICE_ID`
-`EMAIL_USER`
-`EMAIL_CLIENT_ID`
-`EMAIL_CLIENT_SECRET`
-`EMAIL_REFRESH_TOKEN`
-`R2_ACCOUNT_ID`
-`R2_ACCESS_KEY_ID`
-`R2_SECRET_ACCESS_KEY`
-`TASKS_SECRET`
For Datadog logs, the Dokploy host should already run a Datadog Agent with Docker log collection enabled. Then add these Docker Swarm labels in Dokploy `Advanced Settings -> Swarm Settings -> Labels`: