staging test

This commit is contained in:
Adam Cohen Hillel 2025-04-21 00:21:18 +01:00
parent 14dc784f55
commit 43dd749dfc
3 changed files with 44 additions and 3 deletions

View File

@ -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 }}

View File

@ -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

View File

@ -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