Operations
Day-to-day commands, admin tasks, and how the server runs jobs in the background.
The ./run script
./run in the repository root wraps Docker Compose. Run ./run help for the
full list. The ones operators use most:
| Command | Does |
|---|---|
./run up / ./run up:detach | Start the services (with file watching / in the background). |
./run up:build | Rebuild and start. |
./run down | Stop everything. |
./run setup | Install deps, create and migrate the database, run seeds. |
./run migrate | Run database migrations (dev image). |
./run prod:migrate | Run migrations in a production release container. |
./run prod:remote | Open a remote console on a production release. |
./run iex | Elixir console in the dev server container. |
./run mix <task> | Run a mix task in the server container. |
./run psql | Open psql against the database. |
./run secret | Generate a value for SECRET_KEY_BASE. |
./run webhook:test <url> <secret> | Send a signed test webhook. |
./run cli:install | Build and install aperture-cli. |
Elixir tooling runs inside the server container; always call it through ./run
rather than mix on the host.
Admin tasks
These mix tasks run in the dev image (./run mix …). In a production release,
use ./run prod:remote and call the equivalent function shown.
Create a user
./run mix aperture.admin admin@example.com 'a-strong-password'Works even when REGISTRATIONS_ENABLED is off, and prints validation errors
(for example a duplicate email) instead of creating nothing. The user has no
special privileges and belongs to no team; they create or join one from the
dashboard. In a release: Aperture.UserManager.insert_user(%{username: ..., password: ...}).
Billing-exempt teams
With BILLING_ENABLED=false, every team is exempt and this isn't needed. With
billing on, give a single team unlimited, free usage:
./run mix aperture.billing.exempt <team-id> --reason "internal"
./run mix aperture.billing.exempt <team-id> --revokeIn a release: Aperture.Billing.Subscriptions.set_billing_exempt(team_id, "internal")
and Aperture.Billing.Subscriptions.revoke_billing_exempt(team_id).
Run a scheduled execution now
./run mix aperture.exec <execution-id>Moves a scheduled execution's start time to now.
Background processing
The server uses Oban on Postgres for background work:
| Queue | Concurrency (per node) | Work |
|---|---|---|
default | 20 | Running jobs, unpacking deploys. |
webhooks | 50 | Webhook deliveries. |
scheduler | 1 | Scheduling. |
Periodic tasks:
- Every minute: keep each cron job's next run scheduled, mark late cron runs
missed, and fail runs whose heartbeat stopped (orphaned). - Every hour: delete leftover deploy staging directories older than an hour.
- Finished background job records are pruned after 7 days. Execution records are kept.
Health and monitoring
GET /api/v1/healthreturns200 {"status": "ok"}; Compose uses it as the server's health check.- The runner has its own health check binary.
- Execution logs live in S3 under
logs/<project_id>/<job_id>/<execution_id>. Aperture doesn't delete them; set a bucket lifecycle rule if you want retention.