Merge pull request #63 from kortix-ai/PRODUCTION

Prod / staging CI/CD
This commit is contained in:
Adam Cohen Hillel 2025-04-21 00:22:17 +01:00 committed by GitHub
commit e9985b8094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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. # 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' primary_region = 'cdg'
[build] [build]
@ -14,7 +15,7 @@ primary_region = 'cdg'
force_https = true force_https = true
auto_stop_machines = 'stop' auto_stop_machines = 'stop'
auto_start_machines = true auto_start_machines = true
min_machines_running = 0 min_machines_running = 1 # Keep at least 1 machine running for production
processes = ['app'] processes = ['app']
[[vm]] [[vm]]