Skip to content

Open-source status page, incident response and uptime monitoring

1.7 KB
Raw Blame
# fly.toml app configuration file generated for openstatus-api on 2023-09-13T17:29:05+02:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "openstatus-api"
primary_region = "ams"

# serve.ts drains in-flight requests on SIGTERM; Fly defaults to SIGINT.
kill_signal = "SIGTERM"
kill_timeout = "30s"


[build]
  dockerfile = "./Dockerfile"

  [[vm]]
    cpu_kind = "shared"
    cpus = 4
    memory_mb = 1024

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = "suspend"
  auto_start_machines = true
  min_machines_running = 1
  processes = ["app"]

# Keep `soft_limit` < `API_MAX_IN_FLIGHT` (see `[env]`) <= `hard_limit`. If the
# app's cap sits below `soft_limit` the two guards fight: the app sheds 503s
# while Fly still reads the machine as having room and never starts a peer.
[http_service.concurrency]
    type = "requests"
    hard_limit = 1000
    soft_limit = 500

[deploy]
  strategy = "bluegreen"

[[http_service.checks]]
  grace_period = "10s"
  interval = "15s"
  method = "GET"
  timeout = "5s"
  path = "/ping"

[env]
  NODE_ENV = "production"
  PORT = "3000"
  # Backstop only. Fly stops routing here at `hard_limit`, so the in-flight
  # guard should fire only once that has already failed to protect the machine.
  API_MAX_IN_FLIGHT = "1000"


# [checks]
#   [checks.name_of_your_http_check]
#     port = 3000
#     type = "http"
#     interval = "15s"
#     timeout = "10s"
#     grace_period = "30s"
#     method = "get"
#     path = "/ping"

# [[services.http_checks]]
#   interval = 10000
#   grace_period = "5s"
#   method = "get"
#   path = "/ping"
#   protocol = "https"
#   timeout = 2000
#   tls_skip_verify = false