2022-06-10 21:19:20 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
function error_handler() {
|
|
|
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
|
|
|
exit "$2"
|
|
|
|
}
|
|
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
|
2022-10-10 18:27:20 +00:00
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_ENV:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_ENV=staging
|
2022-06-23 18:53:13 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${FLASK_SESSION_SECRET_KEY:-}" ]]; then
|
|
|
|
export FLASK_SESSION_SECRET_KEY=staging_super_secret_key_dont_tell_anyone
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_PASSWORD:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_MYSQL_ROOT_PASSWORD=St4g3Th1515
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_DATABASE_NAME:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_DATABASE_NAME=spiffworkflow_backend_staging
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_DATABASE_DOCKER_RESTART_POLICY:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_DATABASE_DOCKER_RESTART_POLICY=always
|
|
|
|
fi
|
|
|
|
|
2022-08-02 18:02:50 +00:00
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_DOCKER_COMPOSE_PROFILE=run
|
|
|
|
fi
|
|
|
|
|
2022-08-17 21:56:38 +00:00
|
|
|
if [[ -z "${SPIFFWORKFLOW_FRONTEND_URL:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_FRONTEND_URL='http://167.172.242.138:7001'
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_URL:-}" ]]; then
|
|
|
|
export SPIFFWORKFLOW_BACKEND_URL='http://167.172.242.138:7000'
|
|
|
|
fi
|
|
|
|
|
2022-08-17 21:21:24 +00:00
|
|
|
if [[ -z "${OPEN_ID_SERVER_URL:-}" ]]; then
|
|
|
|
export OPEN_ID_SERVER_URL='http://167.172.242.138:7002'
|
|
|
|
fi
|
|
|
|
|
2022-06-10 21:19:20 +00:00
|
|
|
git pull
|
2022-07-11 21:10:07 +00:00
|
|
|
./bin/build_and_run_with_docker_compose
|
2022-06-17 14:35:23 +00:00
|
|
|
./bin/wait_for_server_to_be_up
|