-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathfly.toml
More file actions
93 lines (80 loc) · 2.61 KB
/
fly.toml
File metadata and controls
93 lines (80 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# fly.toml app configuration file generated for adcp-docs on 2025-09-10T17:46:00Z
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
app = 'adcp-docs'
primary_region = 'iad'
[build]
dockerfile = "Dockerfile"
# Run migrations ONCE before deployment, not on every machine startup
# If this fails, the deployment is rolled back automatically
[deploy]
release_command = "node dist/db/migrate.js"
release_command_timeout = "15m"
strategy = "rolling"
[processes]
web = "node dist/index.js"
worker = "node dist/index.js"
[env]
PORT = "8080"
BASE_URL = "https://agenticadvertising.org"
# Disabled - migrations now run via release_command
RUN_MIGRATIONS = "false"
# Use pre-cloned repos from Docker build, skip runtime git fetch.
# Production image has no git binary — unsetting this degrades gracefully
# (repos skip indexing) but does not crash.
SKIP_REPO_SYNC = "true"
[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = "off"
auto_start_machines = true
min_machines_running = 2
processes = ["web"]
[[http_service.checks]]
interval = "15s"
timeout = "20s"
grace_period = "60s"
method = "GET"
path = "/health"
protocol = "http"
tls_skip_verify = false
[http_service.checks.headers]
User-Agent = "Fly Health Check"
# Worker process group config.
#
# The `[[services]]` block here exists only to attach an http_check to the
# worker process group. `auto_start_machines` and `min_machines_running`
# are SET but INERT — Fly only enforces them via fly-proxy, and without a
# `[[services.ports]]` block fly-proxy doesn't route to this service. The
# watchdog at server/src/services/worker-watchdog.ts polls the worker
# directly over 6PN, so its traffic also bypasses fly-proxy and cannot
# trigger autostart.
#
# Rolling deploys can leave the worker `stopped` (flyctl does not always
# issue MachineStart after MachineUpdate). Active recovery now lives in
# the watchdog: when a probe fails, it calls the Fly Machines API to
# start any stopped worker machines. Requires `FLY_API_TOKEN` secret.
[[services]]
internal_port = 8080
protocol = "tcp"
processes = ["worker"]
auto_start_machines = true
auto_stop_machines = "off"
min_machines_running = 1
[[services.http_checks]]
interval = "15s"
timeout = "20s"
grace_period = "60s"
method = "GET"
path = "/health"
protocol = "http"
tls_skip_verify = false
[[vm]]
processes = ["web"]
memory = "4gb"
cpu_kind = "performance"
cpus = 2
[[vm]]
processes = ["worker"]
memory = "4gb"
cpu_kind = "performance"
cpus = 2