# Dokploy "Compose" application. Two services share one image + a storage volume. # Set the env vars in Dokploy's Environment tab (they populate the .env Dokploy # generates, which feeds both the build args and runtime env below). services: web: build: context: . args: NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL} NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY: ${NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY} NEXT_PUBLIC_TURNSTILE_SITE_KEY: ${NEXT_PUBLIC_TURNSTILE_SITE_KEY} NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION: ${NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION:-} NEXT_PUBLIC_BING_SITE_VERIFICATION: ${NEXT_PUBLIC_BING_SITE_VERIFICATION:-} UMAMI_HOST_URL: ${UMAMI_HOST_URL:-} UMAMI_WEBSITE_ID: ${UMAMI_WEBSITE_ID:-} image: podcast-distribution-ai:latest # Apply pending migrations on boot, then serve. command: sh -c "npx prisma migrate deploy && npm run start" restart: unless-stopped environment: STORAGE_DIR: /app/storage PORT: "3000" # Also needed at run time, not just as build args: the app and admin route # groups are `force-dynamic`, so the root layout re-reads these on every # request rather than using the value baked into the prerendered HTML. UMAMI_HOST_URL: ${UMAMI_HOST_URL:-} UMAMI_WEBSITE_ID: ${UMAMI_WEBSITE_ID:-} volumes: - storage:/app/storage expose: - "3000" # Dokploy attaches the Traefik router (domain + SSL) to this service on port 3000. worker: image: podcast-distribution-ai:latest command: npx tsx worker/index.ts restart: unless-stopped environment: STORAGE_DIR: /app/storage volumes: - storage:/app/storage depends_on: - web volumes: storage: