# Self-host (/docs/self-host)



`docker-compose.prod.yml` is a complete deployment: Postgres, Redis, a one-shot migration, the API,
the background worker and the console, plus the static `docs` and `landing` sites. The API is not
published: nginx in the console serves it and forwards `/api`, so the browser stays on one origin
and applications call `https://<console>/api/v1/decisions/:key/execute`.

```bash
export POSTGRES_PASSWORD=... API_KEY_PEPPER=... WEBHOOK_SIGNING_SECRET=...
export CREDENTIALS_ENCRYPTION_KEY="$(openssl rand -base64 32)"
export WEB_ORIGIN=https://decisions.example.com
docker compose -f docker-compose.prod.yml up -d --build
```

* [Configuration](/docs/self-host/configuration) — every environment variable, with default and
  meaning.
* [Docker](/docs/self-host/docker) — the compose services, probes, scaling and drain behavior.
* [Deploy each app separately](/docs/self-host/individual-apps) — build and run the API, worker,
  console, docs and landing on their own.
* [Deploy on AWS](/docs/self-host/aws) — ECS Fargate, RDS, ElastiCache and an ALB.
* [Performance](/docs/self-host/performance) — benchmarks and the caching model.
