Skip to content

Commit

Permalink
Setup a staging environment #212 (#213)
Browse files Browse the repository at this point in the history
Resolve #212
  • Loading branch information
hyukkwonepic authored Jul 7, 2024
1 parent dc89b30 commit 43462d3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/deploy-dailyscrum-core-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy staging dailyscrum-core

on:
workflow_dispatch:

jobs:
deploy:
environment: core:staging
name: fly.io deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --config apps/core/fly.staging.toml --build-secret NEXT_PUBLIC_SUPABASE_URL=${{ secrets.NEXT_PUBLIC_SUPABASE_URL }} --build-secret NEXT_PUBLIC_SUPABASE_ANON_KEY=${{ secrets.NEXT_PUBLIC_SUPABASE_ANON_KEY }} --build-secret NEXT_PUBLIC_METADATA_BASE_URL=${{ secrets.NEXT_PUBLIC_METADATA_BASE_URL }} --build-secret SUPABASE_SERVICE_ROLE_KEY=${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} --build-secret ASSET_PREFIX=${{ secrets.ASSET_PREFIX }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
23 changes: 23 additions & 0 deletions apps/core/fly.staging.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# fly.toml app configuration file generated for dailyscrum-core-stage on 2024-07-07T16:29:54+09:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'dailyscrum-core-staging'
primary_region = 'sjc'

[build]
dockerfile = './Dockerfile'

[http_service]
internal_port = 4001
force_https = true
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']

[[vm]]
memory = '1gb'
cpu_kind = 'shared'
cpus = 1
2 changes: 1 addition & 1 deletion apps/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev -p 4001",
"dev:public": "APP_ENV=public.local react-env --env APP_ENV -- next dev -p 4001",
"dev:live": "APP_ENV=live.local react-env --env APP_ENV -- next dev -p 4001",
"build": "next build",
"start": "next start -p 4001",
"lint": "next lint",
Expand Down

0 comments on commit 43462d3

Please sign in to comment.