diff --git a/.github/workflows/fly-deploy.yml b/.github/workflows/fly-deploy.yml new file mode 100644 index 0000000..b0c246e --- /dev/null +++ b/.github/workflows/fly-deploy.yml @@ -0,0 +1,18 @@ +# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ + +name: Fly Deploy +on: + push: + branches: + - main +jobs: + deploy: + name: Deploy 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: flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..d471d8f --- /dev/null +++ b/fly.toml @@ -0,0 +1,38 @@ +# fly.toml app configuration file generated for buildlight on 2024-08-01T14:11:40-04:00 +# +# See https://fly.io/docs/reference/configuration/ for information about how to use this file. +# + +app = 'buildlight' +primary_region = 'iad' +console_command = '/rails/bin/rails console' + +[build] + +[deploy] + release_command = './bin/rails db:migrate' + +[env] + HOST = 'buildlight.collectiveidea.com' + PORT = '8080' + RUBYOPT = '--enable=frozen-string-literal' + +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = 'stop' + auto_start_machines = true + min_machines_running = 0 + processes = ['app'] + + [[http_service.checks]] + grace_period = "10s" + interval = "30s" + method = "GET" + timeout = "5s" + path = "/up" + +[[vm]] + memory = '512mb' + cpu_kind = 'shared' + cpus = 1