From 43dd749dfc62dda6556bc35157d0af38e3068f06 Mon Sep 17 00:00:00 2001 From: Adam Cohen Hillel Date: Mon, 21 Apr 2025 00:21:18 +0100 Subject: [PATCH] staging test --- .github/workflows/fly-deploy-STAGING.yml | 16 ++++++++++++++++ backend/fly.production.toml | 24 ++++++++++++++++++++++++ backend/{fly.toml => fly.staging.toml} | 7 ++++--- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/fly-deploy-STAGING.yml create mode 100644 backend/fly.production.toml rename backend/{fly.toml => fly.staging.toml} (76%) diff --git a/.github/workflows/fly-deploy-STAGING.yml b/.github/workflows/fly-deploy-STAGING.yml new file mode 100644 index 00000000..9c679230 --- /dev/null +++ b/.github/workflows/fly-deploy-STAGING.yml @@ -0,0 +1,16 @@ +name: Fly Deploy Staging +on: + push: + branches: + - main +jobs: + deploy: + name: Deploy staging app + runs-on: ubuntu-latest + concurrency: deploy-group # optional: ensure only one action runs at a time + steps: + - uses: actions/checkout@v4 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: cd backend && flyctl deploy --remote-only --config fly.staging.toml + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/backend/fly.production.toml b/backend/fly.production.toml new file mode 100644 index 00000000..34eaabab --- /dev/null +++ b/backend/fly.production.toml @@ -0,0 +1,24 @@ +# fly.toml app configuration file generated for backend-sparkling-sea-8773 on 2025-04-18T12:56:23+01:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +# Production app configuration +app = 'backend-PRODUCTION' +primary_region = 'cdg' + +[build] + dockerfile = 'docker/Dockerfile' + +[http_service] + internal_port = 8000 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 1 # Keep at least 1 machine running for production + processes = ['app'] + +[[vm]] + memory = '1gb' + cpu_kind = 'shared' + cpus = 1 \ No newline at end of file diff --git a/backend/fly.toml b/backend/fly.staging.toml similarity index 76% rename from backend/fly.toml rename to backend/fly.staging.toml index 23cb16ed..354bd19a 100644 --- a/backend/fly.toml +++ b/backend/fly.staging.toml @@ -3,7 +3,8 @@ # See https://fly.io/docs/reference/configuration/ for information about how to use this file. # -app = 'backend-sparkling-sea-8773' +# Production app configuration +app = 'backend-STAGING' primary_region = 'cdg' [build] @@ -14,10 +15,10 @@ primary_region = 'cdg' force_https = true auto_stop_machines = 'stop' auto_start_machines = true - min_machines_running = 0 + min_machines_running = 1 # Keep at least 1 machine running for production processes = ['app'] [[vm]] memory = '1gb' cpu_kind = 'shared' - cpus = 1 + cpus = 1 \ No newline at end of file