-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
276 additions
and
302 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Application | ||
APP_PORT=3000 | ||
|
||
# Cognito | ||
COGNITO_AWS_REGION=eu-west-1 | ||
COGNITO_CLIENT_ID=10h1tga4i933buv25lelalmtrn | ||
COGNITO_POOL_ID=eu-west-1_dbfEb2FuH | ||
|
||
# S3 | ||
S3_AWS_REGION=eu-west-1 | ||
AWS_ACCESS_KEY_ID=minio | ||
AWS_SECRET_ACCESS_KEY=minio123 | ||
S3_BUCKET=ngmpub-userdata-local | ||
PROJECTS_S3_BUCKET=ngmpub-project-files-local | ||
S3_ENDPOINT=http://minio:9000 | ||
|
||
# Database | ||
PGUSER=www-data | ||
PGPASSWORD=www-data | ||
PGHOST=db | ||
PGPORT=5432 | ||
PGDATABASE=swissgeol-local | ||
|
||
# sqlx | ||
DATABASE_URL=postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE} |
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 @@ | ||
#!bash | ||
|
||
MAX_RETRY_COUNT=10 | ||
SERVICE_NAME="$1" | ||
|
||
if [ ! -n "$SERVICE_NAME" ]; then | ||
echo "Usage: wait_for_container.sh <service_name>" | ||
exit 1 | ||
fi | ||
|
||
for i in $(seq 1 $MAX_RETRY_COUNT); do | ||
if [ "$(docker inspect -f '{{.State.Health.Status}}' "swissgeol-viewer-app-$SERVICE_NAME-1")" == "healthy" ]; then | ||
echo "Service $SERVICE_NAME is healthy!" | ||
exit 0 | ||
else | ||
echo "Waiting for $SERVICE_NAME to be healthy... (attempt $i of $MAX_RETRY_COUNT)" | ||
sleep 10 | ||
fi | ||
done | ||
|
||
echo "Service $SERVICE_NAME did not become healthy in time." | ||
exit 1 |
Oops, something went wrong.