-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- added chrome and chromedriver to the Dockerfile - parameterised CHROMEDRIVER_VERSION, CHROME_VERSION in Dockerfile - reflect chrome / driver environment changes in protractor.conf.js - allow group name to be passed in via APP_NAME secret - perform fly.toml replacements for DOCKER_IMAGE and APP_NAME variables - adding allowed domains
- Loading branch information
Showing
5 changed files
with
93 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Fly Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ "fly-deploy" ] | ||
pull_request: | ||
branches: [ "fly-deploy" ] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy app | ||
runs-on: ubuntu-latest | ||
concurrency: deploy-group | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set environment variables | ||
run: | | ||
echo "APP_NAME=${{ secrets.APP_NAME }}" >> $GITHUB_ENV | ||
echo "DOCKER_USERNAME=${{ secrets.DOCKER_USERNAME }}" >> $GITHUB_ENV | ||
echo "DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/ngx-ramblers:latest" >> $GITHUB_ENV | ||
echo "ALLOWED_DOMAINS=${{ secrets.ALLOWED_DOMAINS }}" >> $GITHUB_ENV # Add this line | ||
- name: Replace Docker image, app name, and allowed domains in fly.toml | ||
run: | | ||
sed -i 's|\${DOCKER_IMAGE}|'"$DOCKER_IMAGE"'|g' fly.toml | ||
sed -i 's|\${APP_NAME}|'"$APP_NAME"'|g' fly.toml | ||
sed -i 's|\${ALLOWED_DOMAINS}|'"$ALLOWED_DOMAINS"'|g' fly.toml | ||
- name: Install Flyctl | ||
uses: superfly/flyctl-actions/setup-flyctl@master | ||
|
||
- name: Deploy App | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
run: flyctl deploy --remote-only --app $APP_NAME | ||
|
||
- name: Scale App to 1 | ||
env: | ||
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | ||
run: flyctl scale count 1 --app $APP_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# fly.toml app configuration file generated for ngx-ramblers | ||
app = "${APP_NAME}" | ||
primary_region = "lhr" | ||
|
||
[build] | ||
image = "${DOCKER_IMAGE}" | ||
|
||
[http_service] | ||
internal_port = 5000 | ||
force_https = true | ||
auto_stop_machines = "stop" | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ["app"] | ||
|
||
[[http_service.allow_origin]] | ||
origin = "${ALLOWED_DOMAINS}" | ||
|
||
[[vm]] | ||
memory = "1gb" | ||
cpu_kind = "shared" | ||
cpus = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters