-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfly.toml
61 lines (51 loc) · 1.48 KB
/
fly.toml
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
app = "hoof"
primary_region = "ewr"
[build]
dockerfile = "Dockerfile"
[env]
# Environment variables from the API configuration
CLIENT_URL = "https://playfulprogramming.com"
S3_PUBLIC_URL = "https://fly.storage.tigris.dev"
S3_BUCKET = "hoof-storage"
POSTGRES_URL = "postgresql://hoof-db.internal/postgres"
FLY_API_URL = "http://_api.internal:4280"
FLY_WORKER_APP_NAME = "hoof-worker"
# Environment variables from the Worker configuration
WORKER_EXIT_WHEN_DONE = "true"
[experimental]
processes = true
[processes]
# Define the command for running the API process.
api = "pnpm --filter api start"
# Define the command for running the Worker process.
worker = "pnpm --filter worker start"
[[services]]
# API service definition – exposed to external HTTP traffic
name = "api"
internal_port = 8080
processes = ["api"]
protocol = "tcp"
[services.http_checks]
grace_period = "10s"
interval = "30s"
method = "GET"
timeout = "5s"
path = "/health"
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
handlers = ["http"]
port = 80
[[services]]
# Worker service definition – runs as a background process in its own VM, as needed.
# No external port is required, but an internal port is provided for Fly’s requirements.
name = "worker"
processes = ["worker"]
internal_port = 3000
protocol = "tcp"
[services.concurrency]
type = "jobs"
hard_limit = 1
soft_limit = 1