Skip to content

Commit 5788872

Browse files
feat: update auto-stop conditions on fly config tomls
1 parent 8e2bfcf commit 5788872

File tree

2 files changed

+30
-24
lines changed

2 files changed

+30
-24
lines changed

demo-api/fly.production.toml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ PORT = "8000"
88
PRIMARY_REGION = "ams"
99

1010
[build]
11-
dockerfile = "Dockerfile"
11+
dockerfile = "Dockerfile"
1212

1313
[[services]]
1414
internal_port = 8_000
1515
protocol = "tcp"
16+
auto_stop_machines = "stop"
17+
auto_start_machines = true
18+
min_machines_running = 0
1619

17-
[services.concurrency]
18-
hard_limit = 25
19-
soft_limit = 20
20-
type = "connections"
20+
[services.concurrency]
21+
hard_limit = 25
22+
soft_limit = 20
23+
type = "connections"
2124

22-
[[services.ports]]
23-
handlers = [ "tls", "http" ]
24-
port = 443
25+
[[services.ports]]
26+
handlers = ["tls", "http"]
27+
port = 443
2528

26-
[[services.tcp_checks]]
27-
grace_period = "1s"
28-
interval = "15s"
29-
timeout = "2s"
29+
[[services.tcp_checks]]
30+
grace_period = "1s"
31+
interval = "15s"
32+
timeout = "2s"

demo-api/fly.staging.toml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@ PORT = "8000"
88
PRIMARY_REGION = "fra"
99

1010
[build]
11-
dockerfile = "Dockerfile"
11+
dockerfile = "Dockerfile"
1212

1313
[[services]]
1414
internal_port = 8_000
1515
protocol = "tcp"
16+
auto_stop_machines = "stop"
17+
auto_start_machines = true
18+
min_machines_running = 0
1619

17-
[services.concurrency]
18-
hard_limit = 25
19-
soft_limit = 20
20-
type = "connections"
20+
[services.concurrency]
21+
hard_limit = 25
22+
soft_limit = 20
23+
type = "connections"
2124

22-
[[services.ports]]
23-
handlers = [ "tls", "http" ]
24-
port = 443
25+
[[services.ports]]
26+
handlers = ["tls", "http"]
27+
port = 443
2528

26-
[[services.tcp_checks]]
27-
grace_period = "1s"
28-
interval = "15s"
29-
timeout = "2s"
29+
[[services.tcp_checks]]
30+
grace_period = "1s"
31+
interval = "15s"
32+
timeout = "2s"

0 commit comments

Comments
 (0)