Changeset View
Changeset View
Standalone View
Standalone View
dockerfiles/swh-scheduler-api/entrypoint.sh
Show All 18 Lines | |||||
user=${PGUSER} | user=${PGUSER} | ||||
EOF | EOF | ||||
chmod 0400 ~/.pgpass | chmod 0400 ~/.pgpass | ||||
case "$1" in | case "$1" in | ||||
"shell") | "shell") | ||||
exec bash -i | exec bash -i | ||||
;; | ;; | ||||
olasd: the indentation seems to be broken (IME emacs likes mixing tabs and spaces in shell files) | |||||
Done Inline Actionsindeed douardda: indeed | |||||
"swh-scheduler") | |||||
exec $@ | |||||
;; | |||||
*) | *) | ||||
echo Waiting for postgresql to start | echo Waiting for postgresql to start | ||||
until psql service=swh-scheduler -c "select 1" 2>&1 > /dev/null; do sleep 0.1; done | until psql service=swh-scheduler -c "select 1" 2>&1 > /dev/null; do sleep 0.1; done | ||||
echo Setup the swh-scheduler API database | echo Setup the swh-scheduler API database | ||||
PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init scheduler \ | PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init scheduler \ | ||||
--db-name ${POSTGRES_DB} | --db-name ${POSTGRES_DB} | ||||
echo Starting the swh-scheduler API server | echo Starting the swh-scheduler API server | ||||
exec python -m swh.scheduler.api.server /scheduler.yml | exec python -m swh.scheduler.api.server /scheduler.yml | ||||
esac | esac |
the indentation seems to be broken (IME emacs likes mixing tabs and spaces in shell files)