Changeset View
Changeset View
Standalone View
Standalone View
services/swh-storage-replayer/entrypoint.sh
Show All 10 Lines | |||||
case "$1" in | case "$1" in | ||||
"shell") | "shell") | ||||
exec bash -i | exec bash -i | ||||
;; | ;; | ||||
*) | *) | ||||
wait_pgsql | wait_pgsql | ||||
echo Setup the database | echo Setup the database | ||||
PGPASSWORD=${POSTGRES_PASSWORD} swh-db-init storage \ | PGPASSWORD=${POSTGRES_PASSWORD} swh db-init \ | ||||
--db-name ${POSTGRES_DB} | --db-name ${POSTGRES_DB} storage | ||||
echo Starting the swh-storage Kafka storage replayer | echo Starting the swh-storage Kafka storage replayer | ||||
exec swh-journal replay \ | exec swh-journal replay \ | ||||
--broker kafka \ | --broker kafka \ | ||||
--prefix swh.journal.objects \ | --prefix swh.journal.objects \ | ||||
--consumer-id swh.storage.replica | --consumer-id swh.storage.replica | ||||
;; | ;; | ||||
esac | esac |