Skip to content

Commit

Permalink
fly.io deploy scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsaranGithuB committed Aug 11, 2024
1 parent 7aa7239 commit 2ed125e
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules/
18 changes: 18 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Fly Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group # optional: ensure only one action runs at a time
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM pierrezemb/gostatic
COPY ./_site/ /srv/http/
49 changes: 49 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# fly.toml app configuration file generated for ts-tutorial on 2024-08-11T09:12:43+05:30
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'ts-tutorial'
primary_region = 'sin'
kill_signal = 'SIGINT'
kill_timeout = '5s'

[experimental]
auto_rollback = true

[build]

[http_service]
internal_port = 8043
force_https = true
auto_stop_machines = 'stop'
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[services]]
protocol = 'tcp'
internal_port = 8043
processes = ['app']

[[services.ports]]
port = 80
handlers = ['http']
force_https = true

[[services.ports]]
port = 443
handlers = ['tls', 'http']

[services.concurrency]
type = 'connections'
hard_limit = 25
soft_limit = 20

[[services.tcp_checks]]
interval = '15s'
timeout = '2s'
grace_period = '1s'

[[vm]]
size = 'shared-cpu-1x'
196 changes: 196 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2ed125e

Please sign in to comment.