Changeset View
Changeset View
Standalone View
Standalone View
docker/services/swh-scheduler/entrypoint.sh
Show All 11 Lines | |||||
if [ "$1" = 'shell' ] ; then | if [ "$1" = 'shell' ] ; then | ||||
shift | shift | ||||
if (( $# == 0)); then | if (( $# == 0)); then | ||||
exec bash -i | exec bash -i | ||||
else | else | ||||
"$@" | "$@" | ||||
fi | fi | ||||
else | else | ||||
wait_pgsql template1 | wait_pgsql template1 | ||||
olasd: This needs to change back to wait_pgsql (to wait for the right database). | |||||
vsellierAuthorUnsubmitted Done Inline Actionsyes right, it's fixed vsellier: yes right, it's fixed | |||||
echo swh-scheduler database setup | echo swh-scheduler database setup | ||||
if ! check_pgsql_db_created; then | |||||
echo Creating database and extensions... | echo Creating extensions... | ||||
swh db create --db-name ${POSTGRES_DB} scheduler | swh db init-admin --db-name ${POSTGRES_DB} scheduler | ||||
fi | |||||
echo Initializing the database... | echo Initializing the database... | ||||
swh db init --db-name ${POSTGRES_DB} scheduler | swh db init --db-name ${POSTGRES_DB} scheduler | ||||
echo Starting the swh-scheduler API server | echo Starting the swh-scheduler API server | ||||
exec gunicorn --bind 0.0.0.0:5008 \ | exec gunicorn --bind 0.0.0.0:5008 \ | ||||
--log-level DEBUG \ | --log-level DEBUG \ | ||||
--threads 2 \ | --threads 2 \ | ||||
--workers 2 \ | --workers 2 \ | ||||
--reload \ | --reload \ | ||||
--timeout 3600 \ | --timeout 3600 \ | ||||
--config 'python:swh.core.api.gunicorn_config' \ | --config 'python:swh.core.api.gunicorn_config' \ | ||||
'swh.scheduler.api.server:make_app_from_configfile()' | 'swh.scheduler.api.server:make_app_from_configfile()' | ||||
fi | fi |
This needs to change back to wait_pgsql (to wait for the right database).