2022-10-12 14:22:22 +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
|
|
|
|
|
2023-09-29 20:00:16 +00:00
|
|
|
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
|
|
|
. "${script_dir}/local_development_environment_setup"
|
2022-10-12 14:22:22 +00:00
|
|
|
|
|
|
|
if [[ -n "${SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA:-}" ]]; then
|
|
|
|
./bin/boot_server_in_docker
|
|
|
|
else
|
2022-10-12 19:28:52 +00:00
|
|
|
export FLASK_DEBUG=1
|
|
|
|
|
|
|
|
if [[ "${SPIFFWORKFLOW_BACKEND_RUN_DATA_SETUP:-}" != "false" ]]; then
|
2023-08-31 20:09:26 +00:00
|
|
|
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=false SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
2022-10-12 19:28:52 +00:00
|
|
|
fi
|
2023-01-17 17:23:51 +00:00
|
|
|
|
|
|
|
# this line blocks
|
2023-09-29 20:00:16 +00:00
|
|
|
poetry run flask run -p "$port" --host=0.0.0.0
|
2022-10-12 14:22:22 +00:00
|
|
|
fi
|