about summary refs log tree commit diff stats
path: root/fly.toml
diff options
context:
space:
mode:
authorAlan Pearce2023-07-02 09:05:52 +0200
committerAlan Pearce2023-07-02 09:05:52 +0200
commitb180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16 (patch)
tree9a93549c7168d3344afd1338a8b714d33c68f911 /fly.toml
parentb4dc3bd51b45d1343cdf486e4cb54e5e92295534 (diff)
downloadwebsite-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.tar.lz
website-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.tar.zst
website-b180e25232ba4fd943c5eb5ff6ca0a1d70ee7e16.zip
Use fly proxy for TLS termination, using h2c
Diffstat (limited to 'fly.toml')
-rw-r--r--fly.toml34
1 files changed, 15 insertions, 19 deletions
diff --git a/fly.toml b/fly.toml
index e6363d2..1bc1440 100644
--- a/fly.toml
+++ b/fly.toml
@@ -1,5 +1,3 @@
-# fly.toml file generated for alanpearce-eu on 2023-06-30T19:28:33+02:00
-
 app = "alanpearce-eu"
 kill_signal = "SIGINT"
 kill_timeout = 5
@@ -10,22 +8,20 @@ primary_region = "ams"
   path = "/metrics"
 
 [env]
+  CADDY_CLUSTERING_REDIS_HOST = "fly-caddy-storage.upstash.io"
   SITE_ROOT = "/srv"
 
-[http_service]
-  internal_port = 8080
-  force_https = true
-  auto_stop_machines = true
-  auto_start_machines = true
-  min_machines_running = 1
-  [http_service.concurrency]
-    type = "requests"
-    soft_limit = 2000
-    hard_limit = 2500
-  [[http_service.checks]]
-    grace_period = "10s"
-    interval = "30s"
-    method = "GET"
-    timeout = "5s"
-    path = "/"
-
+[[services]]
+  internal_port = 80
+  protocol = "tcp"
+  [services.concurrency]
+    type = "connections"
+    hard_limit = 25
+    soft_limit = 20
+  [[services.ports]]
+    handlers = ["http"]
+    port = 80
+  [[services.ports]]
+    handlers = ["tls"]
+    port = "443"
+    tls_options = { "alpn" = ["h2"] }