33
44export REPOSITORY=nestjs-mod/nestjs-mod-sso
55export REGISTRY=ghcr.io
6- export BASE_SINGLE_SIGN_ON_IMAGE_NAME=" ${REPOSITORY} -base-server"
7- export BUILDER_IMAGE_NAME=" ${REPOSITORY} -builder"
8- export MIGRATIONS_IMAGE_NAME=" ${REPOSITORY} -migrations"
96export SINGLE_SIGN_ON_IMAGE_NAME=" ${REPOSITORY} -server"
10- export NGINX_IMAGE_NAME=" ${REPOSITORY} -nginx"
11- export E2E_TESTS_IMAGE_NAME=" ${REPOSITORY} -e2e-tests"
127export COMPOSE_INTERACTIVE_NO_CLI=1
138export NX_DAEMON=false
149export NX_PARALLEL=1
2823
2924# node
3025if [ -z " ${NAMESPACE} " ]; then
31- export NAMESPACE=sso
26+ echo " Error: NAMESPACE not!" >&2 # Redirect error message to stderr
27+ exit 1 # Exit with an error code
3228fi
3329
3430# common
3531if [ -z " ${SINGLE_SIGN_ON_DOMAIN} " ]; then
36- export SINGLE_SIGN_ON_DOMAIN=example.com
32+ echo " Error: SINGLE_SIGN_ON_DOMAIN not!" >&2 # Redirect error message to stderr
33+ exit 1 # Exit with an error code
3734fi
3835
3936# server
4037if [ -z " ${SINGLE_SIGN_ON_PORT} " ]; then
41- export SINGLE_SIGN_ON_PORT=9191
38+ echo " Error: SINGLE_SIGN_ON_PORT not!" >&2 # Redirect error message to stderr
39+ exit 1 # Exit with an error code
4240fi
4341
4442# server: webhook database
4543if [ -z " ${SINGLE_SIGN_ON_WEBHOOK_DATABASE_PASSWORD} " ]; then
46- export SINGLE_SIGN_ON_WEBHOOK_DATABASE_PASSWORD=webhook_password
44+ echo " Error: SINGLE_SIGN_ON_WEBHOOK_DATABASE_PASSWORD not!" >&2 # Redirect error message to stderr
45+ exit 1 # Exit with an error code
4746fi
4847if [ -z " ${SINGLE_SIGN_ON_WEBHOOK_DATABASE_USERNAME} " ]; then
49- export SINGLE_SIGN_ON_WEBHOOK_DATABASE_USERNAME=${NAMESPACE} _webhook
48+ echo " Error: SINGLE_SIGN_ON_WEBHOOK_DATABASE_USERNAME not!" >&2 # Redirect error message to stderr
49+ exit 1 # Exit with an error code
5050fi
5151if [ -z " ${SINGLE_SIGN_ON_WEBHOOK_DATABASE_NAME} " ]; then
52- export SINGLE_SIGN_ON_WEBHOOK_DATABASE_NAME=${NAMESPACE} _webhook
52+ echo " Error: SINGLE_SIGN_ON_WEBHOOK_DATABASE_NAME not!" >&2 # Redirect error message to stderr
53+ exit 1 # Exit with an error code
5354fi
5455
5556# server: sso database
5657if [ -z " ${SINGLE_SIGN_ON_SSO_DATABASE_PASSWORD} " ]; then
57- export SINGLE_SIGN_ON_SSO_DATABASE_PASSWORD=sso_password
58+ echo " Error: SINGLE_SIGN_ON_SSO_DATABASE_PASSWORD not!" >&2 # Redirect error message to stderr
59+ exit 1 # Exit with an error code
5860fi
5961if [ -z " ${SINGLE_SIGN_ON_SSO_DATABASE_USERNAME} " ]; then
60- export SINGLE_SIGN_ON_SSO_DATABASE_USERNAME=${NAMESPACE} _sso
62+ echo " Error: SINGLE_SIGN_ON_SSO_DATABASE_USERNAME not!" >&2 # Redirect error message to stderr
63+ exit 1 # Exit with an error code
6164fi
6265if [ -z " ${SINGLE_SIGN_ON_SSO_DATABASE_NAME} " ]; then
63- export SINGLE_SIGN_ON_SSO_DATABASE_NAME=${NAMESPACE} _sso
66+ echo " Error: SINGLE_SIGN_ON_SSO_DATABASE_NAME not!" >&2 # Redirect error message to stderr
67+ exit 1 # Exit with an error code
6468fi
6569
6670# server: notifications database
6771if [ -z " ${SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_PASSWORD} " ]; then
68- export SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_PASSWORD=notifications_password
72+ echo " Error: SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_PASSWORD not!" >&2 # Redirect error message to stderr
73+ exit 1 # Exit with an error code
6974fi
7075if [ -z " ${SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_USERNAME} " ]; then
71- export SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_USERNAME=${NAMESPACE} _notifications
76+ echo " Error: SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_USERNAME not!" >&2 # Redirect error message to stderr
77+ exit 1 # Exit with an error code
7278fi
7379if [ -z " ${SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_NAME} " ]; then
74- export SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_NAME=${NAMESPACE} _notifications
80+ echo " Error: SINGLE_SIGN_ON_NOTIFICATIONS_DATABASE_NAME not!" >&2 # Redirect error message to stderr
81+ exit 1 # Exit with an error code
7582fi
7683
7784# server: two factor database
7885if [ -z " ${SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_PASSWORD} " ]; then
79- export SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_PASSWORD=two_factor_password
86+ echo " Error: SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_PASSWORD not!" >&2 # Redirect error message to stderr
87+ exit 1 # Exit with an error code
8088fi
8189if [ -z " ${SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_USERNAME} " ]; then
82- export SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_USERNAME=${NAMESPACE} _two_factor
90+ echo " Error: SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_USERNAME not!" >&2 # Redirect error message to stderr
91+ exit 1 # Exit with an error code
8392fi
8493if [ -z " ${SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_NAME} " ]; then
85- export SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_NAME=${NAMESPACE} _two_factor
94+ echo " Error: SINGLE_SIGN_ON_TWO_FACTOR_DATABASE_NAME not!" >&2 # Redirect error message to stderr
95+ exit 1 # Exit with an error code
8696fi
8797
8898# database
8999if [ -z " ${SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_USERNAME} " ]; then
90- export SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_USERNAME=postgres
100+ echo " Error: SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_USERNAME not!" >&2 # Redirect error message to stderr
101+ exit 1 # Exit with an error code
91102fi
92103if [ -z " ${SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_PASSWORD} " ]; then
93- export SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_PASSWORD=postgres_password
104+ echo " Error: SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_PASSWORD not!" >&2 # Redirect error message to stderr
105+ exit 1 # Exit with an error code
94106fi
95107if [ -z " ${SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_DATABASE} " ]; then
96- export SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_DATABASE=postgres
108+ echo " Error: SINGLE_SIGN_ON_POSTGRE_SQL_POSTGRESQL_DATABASE not!" >&2 # Redirect error message to stderr
109+ exit 1 # Exit with an error code
97110fi
0 commit comments