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

configure login package deployment #4

Merged
merged 5 commits into from
Jan 19, 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
21 changes: 20 additions & 1 deletion .github/workflows/deploy-login.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Deploy Login
on:
workflow_dispatch:
inputs:
environment:
type: choice
description: Select environment
options:
- development
- production
jobs:
deploy:
name: Deploy Login
Expand All @@ -10,9 +17,21 @@ jobs:
uses: styfle/cancel-workflow-action@0.11.0
- name: Checkout repo
uses: actions/checkout@v3
- name: Read app name
uses: SebRollen/toml-action@v1.0.0
id: app_name
with:
file: "fly.login.toml"
field: "app"
- name: Setup deploy
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy development
run: flyctl deploy --config ./fly.login.toml --dockerfile ./Dockerfile.login --remote-only --build-secret dotenv="${{ secrets.ENV_DEV }}"
if: ${{ inputs.environment == 'development' }}
run: flyctl deploy --config ./fly.login.toml --app ${{ steps.app_name.outputs.value }}-dev --remote-only --build-secret dotenv="${{ secrets.ENV_DEV }}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Deploy production
if: ${{ inputs.environment == 'production' }}
run: flyctl deploy --config ./fly.login.toml --remote-only --build-secret dotenv="${{ secrets.ENV_PROD }}"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
2 changes: 1 addition & 1 deletion Dockerfile.login
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ RUN npm prune --omit=dev

# Start the server
EXPOSE 3000
CMD [ "npm", "start:login" ]
CMD [ "npm", "run", "start:login" ]
1 change: 1 addition & 0 deletions fly.login.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ app = "tdk-login"
primary_region = "lax"

[build]
dockerfile = "Dockerfile.login"

[http_service]
internal_port = 3000
Expand Down
Loading