Skip to content

Commit 2ed125e

Browse files
fly.io deploy scripts
1 parent 7aa7239 commit 2ed125e

File tree

5 files changed

+266
-0
lines changed

5 files changed

+266
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/

.github/workflows/fly-deploy.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
jobs:
9+
deploy:
10+
name: Deploy app
11+
runs-on: ubuntu-latest
12+
concurrency: deploy-group # optional: ensure only one action runs at a time
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: superfly/flyctl-actions/setup-flyctl@master
16+
- run: flyctl deploy --remote-only
17+
env:
18+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
FROM pierrezemb/gostatic
2+
COPY ./_site/ /srv/http/

fly.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# fly.toml app configuration file generated for ts-tutorial on 2024-08-11T09:12:43+05:30
2+
#
3+
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
4+
#
5+
6+
app = 'ts-tutorial'
7+
primary_region = 'sin'
8+
kill_signal = 'SIGINT'
9+
kill_timeout = '5s'
10+
11+
[experimental]
12+
auto_rollback = true
13+
14+
[build]
15+
16+
[http_service]
17+
internal_port = 8043
18+
force_https = true
19+
auto_stop_machines = 'stop'
20+
auto_start_machines = true
21+
min_machines_running = 0
22+
processes = ['app']
23+
24+
[[services]]
25+
protocol = 'tcp'
26+
internal_port = 8043
27+
processes = ['app']
28+
29+
[[services.ports]]
30+
port = 80
31+
handlers = ['http']
32+
force_https = true
33+
34+
[[services.ports]]
35+
port = 443
36+
handlers = ['tls', 'http']
37+
38+
[services.concurrency]
39+
type = 'connections'
40+
hard_limit = 25
41+
soft_limit = 20
42+
43+
[[services.tcp_checks]]
44+
interval = '15s'
45+
timeout = '2s'
46+
grace_period = '1s'
47+
48+
[[vm]]
49+
size = 'shared-cpu-1x'

package-lock.json

Lines changed: 196 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)