diff options
| author | Xe Iaso <me@xeiaso.net> | 2024-03-30 13:22:58 -0400 |
|---|---|---|
| committer | Xe Iaso <me@xeiaso.net> | 2024-03-30 13:22:58 -0400 |
| commit | 599c6edf8abbd95410cdebd6488d48a6a7a4986b (patch) | |
| tree | fa6558d3f2819121152af1f0e1286a753d219867 /cmd | |
| parent | f56bd361852f6f254c4a97a5b46b18ba9fd96b87 (diff) | |
| download | x-599c6edf8abbd95410cdebd6488d48a6a7a4986b.tar.xz x-599c6edf8abbd95410cdebd6488d48a6a7a4986b.zip | |
cmd/tourian: fix production deploy
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/tourian/fly.toml | 11 | ||||
| -rw-r--r-- | cmd/tourian/main.go | 6 | ||||
| -rw-r--r-- | cmd/tourian/yeetfile.js | 4 |
3 files changed, 15 insertions, 6 deletions
diff --git a/cmd/tourian/fly.toml b/cmd/tourian/fly.toml index 33479b9..784f4cc 100644 --- a/cmd/tourian/fly.toml +++ b/cmd/tourian/fly.toml @@ -12,10 +12,19 @@ image = "registry.fly.io/tourian:latest" strategy = "immediate" [[services.ports]] -port = 8080 +port = 80 +internal_port = 8080 handlers = ["http"] force_https = true +[[services.ports]] +port = 443 +handlers = ["tls", "http"] +[services.concurrency] +type = "connections" +hard_limit = 1000 +soft_limit = 750 + [[services.tcp_checks]] interval = "15s" timeout = "2s" diff --git a/cmd/tourian/main.go b/cmd/tourian/main.go index da7e8be..f7ad032 100644 --- a/cmd/tourian/main.go +++ b/cmd/tourian/main.go @@ -61,11 +61,7 @@ func main() { mux := http.NewServeMux() mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - if r.URL.Path != "/" { - http.NotFound(w, r) - return - } - http.ServeFile(w, r, "static/index.html") + http.ServeFileFS(w, r, static, "static/index.html") }) mux.Handle("/static/", http.FileServer(http.FS(static))) mux.HandleFunc("/ws", srv.WebsocketHandler) diff --git a/cmd/tourian/yeetfile.js b/cmd/tourian/yeetfile.js new file mode 100644 index 0000000..497f9af --- /dev/null +++ b/cmd/tourian/yeetfile.js @@ -0,0 +1,4 @@ +nix.build(".#docker.tourian") +docker.load("./result") +docker.push("registry.fly.io/tourian:latest") +fly.deploy() |
