Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downscale machines for cost reason #3

Merged
merged 17 commits into from
Jan 7, 2025
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
Loading