diff options
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() |
