aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-10-04 12:07:36 -0400
committerXe Iaso <me@xeiaso.net>2023-10-04 12:07:36 -0400
commit777393ad4ebbc1956abc6530c4f8499356c9a719 (patch)
tree42757179eb64e26c03603b39773b414d45045029
parente260e2b17bbecd34afb49c50cd7dbf4d3b43fed3 (diff)
downloadx-777393ad4ebbc1956abc6530c4f8499356c9a719.tar.xz
x-777393ad4ebbc1956abc6530c4f8499356c9a719.zip
cmd/xedn: fly apps v2
Signed-off-by: Xe Iaso <me@xeiaso.net>
-rw-r--r--cmd/xedn/fly.toml47
-rw-r--r--cmd/xedn/main.go2
2 files changed, 21 insertions, 28 deletions
diff --git a/cmd/xedn/fly.toml b/cmd/xedn/fly.toml
index b293527..8f9c689 100644
--- a/cmd/xedn/fly.toml
+++ b/cmd/xedn/fly.toml
@@ -1,10 +1,9 @@
-# fly.toml file generated for xedn on 2022-09-02T17:14:40Z
-
app = "xedn"
-
kill_signal = "SIGINT"
-kill_timeout = 5
-processes = []
+kill_timeout = "5s"
+
+[experimental]
+ auto_rollback = true
[build]
image = "registry.fly.io/xedn:latest"
@@ -12,41 +11,33 @@ processes = []
[env]
XEDN_STATE = "/data/xedn"
-[experimental]
- allowed_public_ports = []
- auto_rollback = true
-
-[mounts]
- source="xedn_cache"
- destination="/data"
+[[mounts]]
+ source = "xedn_cache"
+ destination = "/data"
[[services]]
- http_checks = []
+ protocol = "tcp"
internal_port = 8080
processes = ["app"]
- protocol = "tcp"
- script_checks = []
-
- [services.concurrency]
- hard_limit = 100
- soft_limit = 75
- type = "connections"
[[services.ports]]
- force_https = true
- handlers = ["http"]
port = 80
+ handlers = ["http"]
+ force_https = true
[[services.ports]]
- handlers = ["tls", "http"]
port = 443
+ handlers = ["tls", "http"]
+ [services.concurrency]
+ type = "connections"
+ hard_limit = 100
+ soft_limit = 75
[[services.tcp_checks]]
- grace_period = "1s"
interval = "15s"
- restart_limit = 0
timeout = "2s"
+ grace_period = "1s"
-[metrics]
-port = 8081
-path = "/metrics"
+[[metrics]]
+ port = 8081
+ path = "/metrics"
diff --git a/cmd/xedn/main.go b/cmd/xedn/main.go
index c9a0c9e..1e4104e 100644
--- a/cmd/xedn/main.go
+++ b/cmd/xedn/main.go
@@ -398,6 +398,8 @@ func main() {
Dir: filepath.Join(*dir, "tsnet"),
}
+ srv.Start()
+
cli := srv.HTTPClient()
sd := &StableDiffusion{