autodisc
Guides

Multi-Service Deployments

Run multiple processes in one project with services.

Most Autodisc projects run a single process per server. If your project has more than one — say a web app plus a background worker — define them under services: in autodisc.yml.

Example

env:
  NODE_ENV: production

services:
  web:
    run: node dist/server.js
    port: 3000
    routes:
      - example.com

  worker:
    run: node dist/worker.js
    internal: true
    depends_on:
      - web

How it works

  • Each service gets its own container inside the same server.
  • Top-level env is merged into every service; service-level env overrides it.
  • A service named web is treated as the primary for routing defaults.
  • internal: true keeps a service off the public network — only sibling services can reach it.
  • depends_on is a list of service names that should start first.

See Configuration for the full field reference.

When not to use it

If you just need a data store, a queue, or a cache, use a managed external service (Supabase, Upstash, etc.) and connect to it via env vars. Multi-service is for processes you own — not for running a database alongside your app.

On this page