From 4c00e48d63b6929c204472a269f69164632405ee Mon Sep 17 00:00:00 2001 From: Sucipto <1310895+suciptoid@users.noreply.github.com> Date: Thu, 15 Dec 2022 06:10:50 +0000 Subject: [PATCH] fly --- .dockerignore | 6 ++++++ fly.toml | 43 +++++++++++++++++++++++++++++++++++++++++++ main.go | 1 - 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .dockerignore create mode 100644 fly.toml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3270bee --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +# flyctl launch added from .gitignore +**/vendor +**/.env +**/.goreload +**/miranda-bot +fly.toml diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..bf70e31 --- /dev/null +++ b/fly.toml @@ -0,0 +1,43 @@ +# fly.toml file generated for tux on 2022-12-15T05:29:35Z + +app = "tux" +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[build] + builder = "paketobuildpacks/builder:base" + buildpacks = ["gcr.io/paketo-buildpacks/go"] + +[env] + PORT = "8080" + +[experimental] + allowed_public_ports = [] + auto_rollback = true + +[[services]] + http_checks = [] + internal_port = 8080 + processes = ["app"] + protocol = "tcp" + script_checks = [] + [services.concurrency] + hard_limit = 25 + soft_limit = 20 + type = "connections" + + [[services.ports]] + force_https = true + handlers = ["http"] + port = 80 + + [[services.ports]] + handlers = ["tls", "http"] + port = 443 + + [[services.tcp_checks]] + grace_period = "1s" + interval = "15s" + restart_limit = 0 + timeout = "2s" diff --git a/main.go b/main.go index 5a093a4..7bc572b 100644 --- a/main.go +++ b/main.go @@ -55,7 +55,6 @@ func main() { groupID, _ := strconv.ParseInt(os.Getenv("GROUP_ID"), 10, 64) config := &config.Configuration{ Port: os.Getenv("PORT"), - UpdateMode: os.Getenv("UPDATE_MODE"), Token: os.Getenv("TOKEN"), WebhookURL: os.Getenv("WEBHOOK_URL"), DBUrl: os.Getenv("DATABASE_URL"),