Configuration
Every environment variable the server, dashboard, docs and Compose setup read.
All services read .env in the repository root (start from .env.example).
Server
Variables marked required stop the server from starting when missing.
Core
| Variable | Required | Default | Description |
|---|---|---|---|
SECRET_KEY_BASE | yes | Phoenix secret. Generate with ./run secret. | |
GUARDIAN_SECRET_KEY | yes | Signs login tokens and API keys. Changing it invalidates every token. | |
ENCRYPTION_KEY | yes | Encrypts secrets (AES-256). Must be base64 of 32 bytes (openssl rand -base64 32); the server refuses to start otherwise. Don't change it once secrets exist. | |
URL_HOST | yes | Public host of the API, used in generated URLs such as trigger URLs. | |
URL_SCHEME | https | Scheme for generated URLs. | |
URL_PORT | 443 | Port for generated URLs. | |
PORT | 4000 | Port the server listens on. | |
DASHBOARD_URL | http://localhost:5173 | Dashboard URL, used in invitation emails and Stripe redirects. Also the only browser origin allowed on the websocket. | |
REGISTRATIONS_ENABLED | off | Set to true to allow sign-ups from the dashboard and API. Admin tasks and seeds ignore it. | |
BILLING_ENABLED | true | Set to false to run without Stripe: the STRIPE_* variables become optional, every team is billing-exempt, and the Stripe webhook endpoint returns 404. | |
RUNNER_URL | http://runner:5000 | Runner service URL. Read when the server is built, not at start-up. | |
MIX_ENV | prod | dev or prod. Also selects the Docker build targets. |
Database
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | Optional Ecto URL; the variables below fill in anything it omits. | |
POSTGRES_HOST | postgres | |
POSTGRES_PORT | 5432 | |
POSTGRES_USER | aperture | |
POSTGRES_PASSWORD | password | |
POSTGRES_DB | value of POSTGRES_USER | |
POSTGRES_POOL | 15 | Connection pool size. |
Log storage (S3)
All required.
| Variable | Description |
|---|---|
S3_BUCKET | Bucket for execution logs (default aperture). |
S3_REGION | Region. |
S3_HOST, S3_PORT | Endpoint host and port. HTTPS is always used. |
S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEY | Credentials. |
Log links are pre-signed against S3_HOST, so it must be reachable from the
browsers that open logs.
Invitations are sent by email.
| Variable | Description |
|---|---|
EMAIL_PROVIDER | resend, aws (SES), or anything else to not send email (dev). |
RESEND_API_KEY | For resend. |
AWS_SES_REGION, AWS_SES_ACCESS_KEY_ID, AWS_SES_SECRET_ACCESS_KEY | For aws. |
EMAIL_FROM_NAME, EMAIL_FROM_ADDRESS | Sender. Set both. |
In development, unsent emails can be viewed at http://localhost:4000/dev/mailbox.
Stripe
Required unless BILLING_ENABLED=false: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRODUCT_ID,
STRIPE_PRICE_PRO, STRIPE_PRICE_PREMIUM_BASE,
STRIPE_PRICE_PREMIUM_JOB_MINUTES, STRIPE_PRICE_PREMIUM_WEBHOOK_DELIVERIES,
STRIPE_METER_JOB_EXECUTION_MINUTES, STRIPE_METER_WEBHOOK_DELIVERIES,
STRIPE_SUCCESS_URL, STRIPE_CANCEL_URL.
Point Stripe's webhooks at https://<api host>/api/v1/webhooks/stripe.
Clustering
| Variable | Description |
|---|---|
DNS_CLUSTER_QUERY | DNS name that resolves to the other server nodes, to cluster them. |
Dashboard (build time)
Baked in when the dashboard is built.
| Variable | Default | Description |
|---|---|---|
VITE_API_URL | /api | API base including /api, e.g. https://api.example.com/api. |
VITE_API_VERSION | 1 | API version number (not v1). |
VITE_SOCKET_URL | /socket in the Docker image | Websocket URL. The image's nginx proxies /socket to the API. |
VITE_DOCS_URL | https://aperture-docs.mountaindev.com | Target of the sidebar's Documentation link. |
VITE_APP_NAME | Aperture | Name in the page title. |
The dashboard image also reads one variable at run time:
| Variable | Default | Description |
|---|---|---|
API_UPSTREAM | https://aperture-server.mountaindev.com | Where nginx proxies /api/ and /socket. |
Docs site (build time)
| Variable | Default | Description |
|---|---|---|
DOCS_URL | https://aperture-docs.mountaindev.com | Public origin of the docs, used for canonical links and the URLs in llms.txt. Passed to the image as VITE_DOCS_URL. |
Compose
| Variable | Default | Description |
|---|---|---|
COMPOSE_PROFILES | Services to start: any of postgres, web, runner, dashboard, docs. | |
DOCKER_WEB_PORT_FORWARD | 127.0.0.1:4000 | Host binding for the API. |
DOCKER_DASHBOARD_PORT_FORWARD | 127.0.0.1:3000 | Host binding for the dashboard. |
DOCKER_DOCS_PORT_FORWARD | 127.0.0.1:3001 | Host binding for the docs. |
DOCKER_RESTART_POLICY | unless-stopped | Restart policy. |
DOCKER_WEB_CPUS, DOCKER_WEB_MEMORY, DOCKER_DASHBOARD_CPUS, DOCKER_DASHBOARD_MEMORY, DOCKER_POSTGRES_CPUS, DOCKER_POSTGRES_MEMORY | 0 (no limit) | Container resource limits. |
DOCKER_WEB_HEALTHCHECK_TEST, DOCKER_DASHBOARD_HEALTHCHECK_TEST, DOCKER_DOCS_HEALTHCHECK_TEST | curl … | Health check commands. |
MINIO_ROOT_USER, MINIO_ROOT_PASSWORD | minioadmin | Local MinIO credentials. |
UID, GID | 1000 | User IDs for the server image. |