Log inStart free

aloof.toml reference

Fly-style config. aloof config validate checks it against the server. Unknown keys give warnings, not errors.

app = "my-app"
primary_region = "eu-de"     # regions = [...] is accepted; one region runs today

[build]
  dockerfile = "Dockerfile"       # or image = "ghcr.io/me/app:1" | git = "git@github.com:me/app.git" + ref
  [build.build_args]
    NODE_ENV = "production"

[env]
  LOG_LEVEL = "info"              # secrets: aloof secrets set (encrypted, never in this file)

[processes]                       # process groups: web gets HTTP, the others run as workers
  web = "gunicorn app:app --bind 0.0.0.0:8080"
  worker = "celery -A app worker"

[scale]
  web = 2
  worker = 1

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true       # scale to zero when idle
  min_machines_running = 0
  [http_service.concurrency]
    soft_limit = 25               # autoscale target per instance
  [[http_service.checks]]
    path = "/healthz"
    interval = "10s"

[deploy]
  release_command = "python manage.py migrate --noinput"

[[mounts]]
  source = "data"                 # created on first deploy
  destination = "/data"
  initial_size = "3gb"

[autoscale]                       # explicit alternative to auto_stop_machines
  min = 1
  max = 4
  target_concurrency = 20

[[vm]]
  size = "shared-1x-1gb"          # or cpus = 2, memory = "2gb"

[[cron]]
  name = "nightly"
  schedule = "0 3 * * *"          # UTC; @hourly/@daily/@weekly work too
  command = "python manage.py cleanup"

Only the first [[services]] entry is routed (HTTP/HTTPS on 80/443). Raw TCP/UDP public ports aren't offered.