Add automated Fly.io deployments

Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
Gunwant Jain
2022-01-21 12:36:36 +05:30
parent 54aa737661
commit fa9a97ce9c
3 changed files with 62 additions and 1 deletions

20
.github/workflows/flyci.yml vendored Normal file
View File

@@ -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"

2
Cargo.lock generated
View File

@@ -98,7 +98,7 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
[[package]]
name = "bin"
version = "0.1.0"
version = "2.0.0"
dependencies = [
"clap",
"rand",

41
fly.toml Normal file
View File

@@ -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"