Skip to content

Commit

Permalink
Setup fly
Browse files Browse the repository at this point in the history
  • Loading branch information
albus522 committed Aug 1, 2024
1 parent 7e52ad4 commit 389cf05
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
38 changes: 38 additions & 0 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 389cf05

Please sign in to comment.