-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create two env files * Add root var * Add base back to compose * Add base values to root .env --------- Co-authored-by: Michael Peels <michaelpeels@Michael-Peels.local>
- Loading branch information
Showing
6 changed files
with
63 additions
and
10 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 was deleted.
Oops, something went wrong.
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
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,32 @@ | ||
set -e | ||
BASE="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
ROOT="$BASE/.." | ||
|
||
# Checks for the presence of a `.env` file in the scripts directory. | ||
# If one is found, load the values, otherwise create the .env with placeholders for expected values | ||
if [ -f $BASE/.env ] && [ -f $ROOT/.env ]; then | ||
echo "Reading from .env files..." | ||
source "$BASE/.env" | ||
source "$ROOT/.env" | ||
else | ||
echo "No .env file found, creating..." | ||
echo "DATABASE_PASSWORD=$DATABASE_PASSWORD" > $BASE/.env | ||
echo "NIFI_PASSWORD=$NIFI_PASSWORD" >> $BASE/.env | ||
echo "KEYCLOAK_ADMIN_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD" >> $BASE/.env | ||
|
||
echo "DATABASE_PASSWORD=$DATABASE_PASSWORD" > $ROOT/.env | ||
echo "TOKEN_SECRET=$TOKEN_SECRET" >> $ROOT/.env | ||
echo "PARAMETER_SECRET=$PARAMETER_SECRET" >> $ROOT/.env | ||
|
||
# Supplmental values | ||
echo 'NBS_DATASOURCE_SERVER=nbs-mssql' >> $ROOT/.env | ||
echo 'CLASSIC_SERVICE=wildfly:7001' >> $ROOT/.env | ||
echo 'MODERNIZATION_SERVICE=${MODERNIZATION_API_SERVER:-modernization-api}:${MODERNIZATION_API_PORT:-8080}' >> $ROOT/.env | ||
echo 'UI_SERVICE=${MODERNIZATION_UI_SERVER:-modernization-api}:${MODERNIZATION_UI_PORT:-8080}' >> $ROOT/.env | ||
echo 'PAGEBUILDER_SERVICE=${PAGEBUILDER_API_SERVER:-pagebuilder-api}:${PAGEBUILDER_API_PORT:-8095}' >> $ROOT/.env | ||
echo 'NBS_SECURITY_OIDC_ENABLED=${OIDC_ENABLED:-false}' >> $ROOT/.env | ||
echo 'NBS_SECURITY_OIDC_URI=${ISSUER_URI:-http://keycloak:8080/realms/nbs-users}' >> $ROOT/.env | ||
echo 'PAGEBUILDER_ENABLED=true' >> $ROOT/.env | ||
|
||
|
||
fi |