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 authored and hsb1007 committed Jun 13, 2024
1 parent 0e36e51 commit a7703dc
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 @@ -42,9 +42,10 @@ jobs:
- name: Deploy
env:
FLY_APP_NAME: ${{ vars.FLY_APP_NAME }}
FLY_CONFIG_FILE_NAME: ${{ github.ref == 'refs/heads/main' && 'fly.prod.toml' || 'flu.stage.toml' }}
run: |
~/.fly/bin/fly deploy \
--config fly.toml \
--config $FLY_CONFIG_FILE_NAME \
--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 a7703dc

Please sign in to comment.