-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #347 from ntampakas/staging_env
Enable ECS staging deployment
- Loading branch information
Showing
5 changed files
with
53 additions
and
17 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 |
---|---|---|
@@ -1,14 +1,17 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
env="" | ||
|
||
[ "$1" = "prod" ] || env="-$1" | ||
|
||
tasks="bandada-client bandada-api bandada-dashboard" | ||
tasks="bandada-client$env bandada-api$env bandada-dashboard$env" | ||
for task in $tasks; do | ||
bandada_revision=$(aws ecs describe-task-definition --task-definition $task --query "taskDefinition.revision") | ||
aws ecs update-service --cluster bandada --service $task --force-new-deployment --task-definition $task:$bandada_revision | ||
aws ecs update-service --cluster bandada$env --service $task --force-new-deployment --task-definition $task:$bandada_revision | ||
done | ||
|
||
for loop in {1..2}; do | ||
aws ecs wait services-stable --cluster bandada --services $tasks && break || continue | ||
for loop in {1..3}; do | ||
[ "$loop" -eq 3 ] && exit 1 | ||
aws ecs wait services-stable --cluster bandada$env --services $tasks && break || continue | ||
done | ||
|
||
exit 0 |
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,4 @@ | ||
# This file contains build time variables for staging env. | ||
|
||
VITE_API_URL=https://api-staging.bandada.pse.dev | ||
VITE_DASHBOARD_URL=https://staging.bandada.pse.dev |
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,9 @@ | ||
# This file contains build time variables for staging env. | ||
|
||
VITE_API_URL=https://api-staging.bandada.pse.dev | ||
VITE_CLIENT_URL=https://client-staging.bandada.pse.dev | ||
VITE_CLIENT_INVITES_URL=https://client-staging.bandada.pse.dev?inviteCode=\ | ||
VITE_ETHEREUM_NETWORK=goerli | ||
VITE_GITHUB_CLIENT_ID=6ccd7b93e84260e353f9 | ||
VITE_TWITTER_CLIENT_ID=NV82Mm85NWlSZ1llZkpLMl9vN3A6MTpjaQ | ||
VITE_TWITTER_REDIRECT_URI=https://staging.bandada.pse.dev/credentials |