diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 3740396..4c14507 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -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 }} \ No newline at end of file diff --git a/backend/fly.toml b/backend/fly.toml index 19568e6..0d21faa 100644 --- a/backend/fly.toml +++ b/backend/fly.toml @@ -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' @@ -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 diff --git a/frontend/fly.toml b/frontend/fly.toml index 104d581..085e52c 100644 --- a/frontend/fly.toml +++ b/frontend/fly.toml @@ -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