diff --git a/docker/services/swh-storage/entrypoint.sh b/docker/services/swh-storage/entrypoint.sh --- a/docker/services/swh-storage/entrypoint.sh +++ b/docker/services/swh-storage/entrypoint.sh @@ -24,6 +24,11 @@ "shell") exec bash -i ;; + "swh") + shift + echo "Running swh command $@" + exec swh $@ + ;; *) if [ "$STORAGE_BACKEND" = "postgresql" ]; then wait_pgsql ${POSTGRES_DB} diff --git a/docker/services/swh-worker/entrypoint.sh b/docker/services/swh-worker/entrypoint.sh --- a/docker/services/swh-worker/entrypoint.sh +++ b/docker/services/swh-worker/entrypoint.sh @@ -7,8 +7,16 @@ case "$1" in "shell") - exec bash -i + shift + echo "Running command $@" + exec bash -i "$@" ;; + "swh") + shift + wait-for-it swh-storage:5002 -s --timeout=0 + echo "Running swh command $@" + exec swh $@ + ;; *) echo Waiting for RabbitMQ to start wait-for-it amqp:5672 -s --timeout=0