Skip to content

Commit

Permalink
Merge pull request #56 from opportunity-hack/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
gregv authored Nov 26, 2023
2 parents 539c02a + 0161373 commit 9c5215b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 54 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ on:
push:
branches:
- dev
- main
- release
- main
pull_request: {}

concurrency:
Expand Down Expand Up @@ -142,28 +141,22 @@ jobs:
file: 'fly.toml'
field: 'app'

- name: 🚀 Deploy Dev to https://evs-635a-staging.fly.dev/
- name: 🚀 Deploy Dev to https://staging.trottrack.org/
if: ${{ github.ref == 'refs/heads/dev' }}
uses: superfly/[email protected]
with:
args:
'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app
${{ steps.app_name.outputs.value }}-staging'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

- name: 🚀 Deploy Main to https://staging.trottrack.org/
if: ${{ github.ref == 'refs/heads/main' }}
uses: superfly/[email protected]
with:
args: 'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}'
env:
FLY_API_TOKEN: ${{ secrets.FLY_STAGING_API_TOKEN }}

- name: 🚀 Deploy Release to https://thebarn.trottrack.org/
if: ${{ github.ref == 'refs/heads/release' }}
- name: 🚀 Deploy Main to https://thebarn.trottrack.org/
if: ${{ github.ref == 'refs/heads/main' }}
uses: superfly/[email protected]
with:
args: 'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }}'
args:
'deploy --remote-only --build-arg COMMIT_SHA=${{ github.sha }} --app
${{ steps.app_name.outputs.value }}-production'
env:
FLY_API_TOKEN: ${{ secrets.FLY_RELEASE_API_TOKEN }}
FLY_API_TOKEN: ${{ secrets.FLY_RELEASE_API_TOKEN }}
8 changes: 8 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Initial setup

To create a new app, use the following two commands:
```
fly launch --name evs-production --org opportunity-hack -r sjc
fly deploy --app evs-production
```

# Deployment

## First time setup
Expand Down
78 changes: 39 additions & 39 deletions fly.toml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
app = "evs-635a"
# fly.toml app configuration file generated for evs-production on 2023-11-19T12:41:31-07:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = "evs"
primary_region = "sjc"
kill_signal = "SIGINT"
kill_timeout = 5
processes = [ ]
kill_timeout = "5s"

[experimental]
allowed_public_ports = [ ]
auto_rollback = true

[mounts]
source = "data"
destination = "/data"
auto_rollback = true

[deploy]
release_command = "node ./other/sentry-create-release"
release_command = "node ./other/sentry-create-release"

[[services]]
internal_port = 8080
processes = [ "app" ]
protocol = "tcp"
script_checks = [ ]
[env]
TZ = "US/Arizona"

[services.concurrency]
hard_limit = 100
soft_limit = 80
type = "connections"
[[mounts]]
source = "data"
destination = "/data"

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

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

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

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

[[services.http_checks]]
interval = "10s"
grace_period = "5s"
method = "get"
path = "/resources/healthcheck"
protocol = "http"
timeout = "2s"
tls_skip_verify = false
headers = { }

[env]
TZ = "US/Arizona"
interval = "10s"
timeout = "2s"
grace_period = "5s"
restart_limit = 0
method = "get"
path = "/resources/healthcheck"
protocol = "http"

0 comments on commit 9c5215b

Please sign in to comment.