Skip to content

Commit

Permalink
Merge pull request #3 from daniellaera/feature/fly-vm-configs
Browse files Browse the repository at this point in the history
downscale machines for cost reason
  • Loading branch information
daniellaera authored Jan 7, 2025
2 parents a3a0222 + ebddb7c commit aeb1b15
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,10 @@ jobs:
id: deploy
uses: superfly/fly-pr-review-apps@1.3.0
with:
ha: 'true'
region: cdg
memory: '512'
cpukind: 'shared'
vmsize: 'shared-cpu-1x'
path: ./backend
secrets: DATABASE_URL=${{ env.DATABASE_URL }}
31 changes: 29 additions & 2 deletions backend/fly.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# fly.toml app configuration file generated for blog-app-black-pine-3535 on 2024-10-31T12:45:04+01:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#


app = 'blog-app-black-pine-3535'
primary_region = 'cdg'
Expand All @@ -16,7 +16,34 @@ primary_region = 'cdg'
min_machines_running = 0
processes = ['app']

[[services]]
http_checks = []
internal_port = 80
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"

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

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

[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"

[[vm]]
memory = '1gb'
size = 'shared-cpu-1x'
memory = '512mb'
cpu_kind = 'shared'
cpus = 1
29 changes: 28 additions & 1 deletion frontend/fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,34 @@ primary_region = 'cdg'
min_machines_running = 0
processes = ['app']

[[services]]
http_checks = []
internal_port = 80
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"

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

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

[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"

[[vm]]
memory = '1gb'
size = 'shared-cpu-1x'
memory = '512mb'
cpu_kind = 'shared'
cpus = 1

0 comments on commit aeb1b15

Please sign in to comment.