File tree Expand file tree Collapse file tree 3 files changed +46
-25
lines changed
Expand file tree Collapse file tree 3 files changed +46
-25
lines changed Original file line number Diff line number Diff line change 1+ # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
2+
3+ name : Fly Deploy
4+ on :
5+ push :
6+ branches :
7+ - main
8+ - pro
9+ jobs :
10+ deploy :
11+ name : Deploy app
12+ runs-on : ubuntu-latest
13+ concurrency : deploy-group # optional: ensure only one action runs at a time
14+ steps :
15+ - uses : actions/checkout@v4
16+ - uses : superfly/flyctl-actions/setup-flyctl@master
17+ - run : flyctl deploy --remote-only
18+ env :
19+ FLY_API_TOKEN : ${{ secrets.FLYIO_TOKEN }}
Original file line number Diff line number Diff line change 1+ ARG GO_VERSION=1
2+ FROM golang:${GO_VERSION}-bookworm as builder
3+
4+ WORKDIR /usr/src/app
5+ COPY go.mod go.sum ./
6+ RUN go mod download && go mod verify
7+ COPY . .
8+ RUN go build -v -o /run-app .
9+
10+
11+ FROM debian:bookworm
12+
13+ COPY --from=builder /run-app /usr/local/bin/
14+ CMD ["run-app" ]
Original file line number Diff line number Diff line change 1- # fly.toml app configuration file generated for next-backend on 2024-07-19T08:47:44+01 :00
1+ # fly.toml app configuration file generated for digger-pro on 2025-02-18T09:50:24+03 :00
22#
33# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
44#
55
6- app = ' next-backend '
6+ app = ' digger-pro '
77primary_region = ' lhr'
8- kill_signal = ' SIGINT'
9- kill_timeout = ' 5s'
10-
11- [env ]
12- DIGGER_HOSTNAME = ' https://ui-backend.digger.dev'
138
149[build ]
15- dockerfile = ' Dockerfile_backend'
10+ [build .args ]
11+ GO_VERSION = ' 1.22.4'
1612
17- [[services ]]
18- protocol = ' tcp'
19- internal_port = 3000
13+ [env ]
14+ PORT = ' 8080'
15+
16+ [http_service ]
17+ internal_port = 8080
18+ force_https = true
19+ auto_stop_machines = ' stop'
20+ auto_start_machines = true
21+ min_machines_running = 0
2022 processes = [' app' ]
2123
22- [[services .ports ]]
23- port = 80
24- handlers = [' http' ]
25- force_https = true
26-
27- [[services .ports ]]
28- port = 443
29- handlers = [' tls' , ' http' ]
30-
31- [services .concurrency ]
32- type = ' connections'
33- hard_limit = 25
34- soft_limit = 20
35-
3624[[vm ]]
3725 memory = ' 1gb'
3826 cpu_kind = ' shared'
You can’t perform that action at this time.
0 commit comments