Every service in this guide draws from the same plan quota. The Fair Scheduler distributes CPU fairly across all of them under load, so a busy worker can’t starve your API and a burst of API traffic can’t stall your cron jobs.
The services
Public API
An HTTP service that listens on port 5000 and accepts inbound traffic.
Background worker
A private app running a non-web command - just another process, kept off the public network.
Cron jobs
Scheduled tasks that run on a fixed cadence.
Managed data
A managed PostgreSQL database and a managed Valkey cache, wired in automatically.
Option A: one Compose Stack
The cleanest way to describe a multi-service app is a single Docker Compose Stack. Keep your standardcompose.yaml for local development, then add a compose.miget.yaml overlay that tells Miget how to size and expose each service using the x-miget keys.
webis your public entry point. It must listen on port 5000 - that is the port Miget routes external traffic to.workeris markedprivate: true, so it runs inside the plan but is never exposed to the internet. Reach it over private networking.dbusesmanaged: postgres, so Miget provisions and runs a managed PostgreSQL instance instead of building the image. Miget injectsDATABASE_URLinto your services.cacheusesmanaged: valkey, so Miget provisions a managed Valkey instance and injectsREDIS_URLinto your services.
compose.yaml and compose.miget.yaml, and the whole stack deploys into one Resource. See Docker Compose Stacks for the full overlay reference.
Option B: individual services
If you’d rather assemble the stack piece by piece, deploy each service into the same Resource from the dashboard.Create the API app
Create your app, have it listen on port 5000, and deploy it with a
git push. This is your public HTTP entry point.Add a PostgreSQL addon
From the app’s Addons tab, add a PostgreSQL addon. Miget injects
DATABASE_URL into the app so your API can connect immediately.Add a Valkey addon
Still on the Addons tab, add a Valkey addon. Miget injects
REDIS_URL for your cache connection.Deploy the worker
Deploy your worker as a separate app whose start command runs a non-web process. Keep it private with no public port - it’s just another app running a background command inside the same plan.
PORT and any credentials stay consistent.
Next steps
Fair Scheduler
How CPU is shared fairly across every service in your plan.
Resource plans
Pick the plan size that fits your whole stack.
Docker Compose Stacks
The full
x-miget overlay reference for multi-service deploys.Private networking
Connect your services to each other without exposing them.

