Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an Github action for deploying to fly.io #67

Merged
merged 1 commit into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Deploy
name: Production Deployment to Fly.Io

on:
push:
branches:
- main

env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/heroku-deploy@v3.12.12 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "waterloo-jam-league" #Must be unique in Heroku
heroku_email: "dallas.fraser.waterloo@gmail.com"
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --config ./deployments/fly-production.toml
41 changes: 41 additions & 0 deletions deployments/fly-development.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# fly.toml app configuration file generated for mlsb-development on 2023-05-28T20:49:38-04:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "waterloo-jam-league"
kill_signal = "SIGINT"
kill_timeout = "5s"

[experimental]
auto_rollback = true

[build]
builder = "paketobuildpacks/builder:base"

[env]
PORT = "8080"

[[services]]
protocol = "tcp"
internal_port = 8080
processes = ["app"]

[[services.ports]]
port = 80
handlers = ["http"]
force_https = true

[[services.ports]]
port = 443
handlers = ["tls", "http"]
[services.concurrency]
type = "connections"
hard_limit = 70
soft_limit = 20

[[services.tcp_checks]]
interval = "15s"
timeout = "2s"
grace_period = "1s"
restart_limit = 0
Loading