Skip to content

Commit

Permalink
chore(fly): Update fly config
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Jun 12, 2024
1 parent a85394a commit fd6f03d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_APP_NAME: ${{ vars.DATABASE_APP_NAME }}
FLY_CONFIG_FILE_NAME: ${{ github.ref == 'refs/heads/main' && 'fly.prod.toml' || 'flu.stage.toml' }}
run: |
~/.fly/bin/fly proxy 5432:5432 $DATABASE_APP_NAME.flycast --app $DATABASE_APP_NAME --access-token $FLY_ACCESS_TOKEN &
pnpm db:deploy-migrations
Expand All @@ -44,7 +45,7 @@ jobs:
FLY_APP_NAME: ${{ vars.FLY_APP_NAME }}
run: |
~/.fly/bin/fly deploy \
--config fly.toml \
--config \
--dockerfile Dockerfile \
--app $FLY_APP_NAME \
--access-token $FLY_ACCESS_TOKEN
33 changes: 33 additions & 0 deletions fly.prod.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
primary_region = "syd"

[http_service]
internal_port = 4200
force_https = true
auto_stop_machines = false
auto_start_machines = false
min_machines_running = 1
[http_service.concurrency]
type = "requests"
soft_limit = 500
hard_limit = 750

[http_service.tls_options]
alpn = ["h2", "http/1.1"]
versions = ["TLSv1.2", "TLSv1.3"]
default_self_signed = true

[[http_service.checks]]
grace_period = "10s"
interval = "30s"
method = "GET"
timeout = "10s"
path = "/api/health"
protocol = "http"
port = 4200
tls_skip_verify = true

[[vm]]
size = "shared-cpu-1x"
memory = "512mb"
cpus = 1
cpu_kind = "shared"
4 changes: 2 additions & 2 deletions fly.toml → fly.stage.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ primary_region = "syd"
[http_service]
internal_port = 4200
force_https = true
auto_stop_machines = false
auto_start_machines = false
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
[http_service.concurrency]
type = "requests"
Expand Down

0 comments on commit fd6f03d

Please sign in to comment.