diff --git a/.github/workflows/flyci.yml b/.github/workflows/flyci.yml new file mode 100644 index 0000000..70e7188 --- /dev/null +++ b/.github/workflows/flyci.yml @@ -0,0 +1,20 @@ +name: Fly.io Deploy + +on: + workflow_run: + workflows: ["Docker CI"] + types: + - completed + +env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + +jobs: + deploy: + name: Deploy app + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: superfly/flyctl-actions@1.1 + with: + args: "deploy" diff --git a/Cargo.lock b/Cargo.lock index f28db5d..31f67a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -98,7 +98,7 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bin" -version = "0.1.0" +version = "2.0.0" dependencies = [ "clap", "rand", diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..3e5c878 --- /dev/null +++ b/fly.toml @@ -0,0 +1,41 @@ +app = "basedbin" + +kill_signal = "SIGINT" +kill_timeout = 5 +processes = [] + +[build] + image = "wantguns/bin" + +[env] + BIN_LIMITS={form="16 MiB"} + +[experimental] + allowed_public_ports = [] + auto_rollback = true + +[[services]] + http_checks = [] + internal_port = 6162 + processes = ["app"] + protocol = "tcp" + script_checks = [] + + [services.concurrency] + hard_limit = 25 + soft_limit = 20 + type = "connections" + + [[services.ports]] + handlers = ["http"] + port = 80 + + [[services.ports]] + handlers = ["tls", "http"] + port = 443 + + [[services.tcp_checks]] + grace_period = "1s" + interval = "15s" + restart_limit = 0 + timeout = "2s"