Changeset View
Changeset View
Standalone View
Standalone View
dockerfiles/swh-storage/entrypoint.sh
Show All 20 Lines | |||||
chmod 0400 ~/.pgpass | chmod 0400 ~/.pgpass | ||||
case "$1" in | case "$1" in | ||||
"shell") | "shell") | ||||
exec bash -i | exec bash -i | ||||
;; | ;; | ||||
*) | *) | ||||
echo Waiting for postgresql to start | |||||
ardumont: indexer? | |||||
Done Inline ActionsWoops :D vlorentz: Woops :D | |||||
until psql service=swh -c "select 1" > /dev/null 2> /dev/null; do sleep 0.1; done | |||||
echo Setup the database | echo Setup the database | ||||
PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init storage \ | PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init storage \ | ||||
--db-name ${POSTGRES_DB} | --db-name ${POSTGRES_DB} | ||||
echo Starting the swh-storage API server | echo Starting the swh-storage API server | ||||
exec python -m swh.storage.api.server /storage.yml | exec python -m swh.storage.api.server /storage.yml | ||||
;; | ;; | ||||
esac | esac |
indexer?