Changeset View
Changeset View
Standalone View
Standalone View
dockerfiles/swh-storage-listener/entrypoint.sh
- This file was added.
Property | Old Value | New Value |
---|---|---|
File Mode | null | 100755 |
#!/bin/bash | |||||
set -e | |||||
if [[ -d /src ]] ; then | |||||
for srcrepo in /src/swh-* ; do | |||||
pushd $srcrepo | |||||
pip install -e . | |||||
popd | |||||
done | |||||
fi | |||||
echo "${PGHOST}:5432:${POSTGRES_DB}:${PGUSER}:${POSTGRES_PASSWORD}" > ~/.pgpass | |||||
cat > ~/.pg_service.conf <<EOF | |||||
[swh] | |||||
dbname=${POSTGRES_DB} | |||||
host=${PGHOST} | |||||
port=5432 | |||||
user=${PGUSER} | |||||
EOF | |||||
chmod 0600 ~/.pgpass | |||||
case "$1" in | |||||
"shell") | |||||
exec bash -i | |||||
;; | |||||
*) | |||||
echo "Waiting for postgresql to start" | |||||
until psql service=swh -c "select 1" 1>&2 >/dev/null; do sleep 0.1; done | |||||
vlorentz: `2>&1` to redirect stderr to stdout. | |||||
Done Inline Actionslol ardumont: lol
Right you are!
thanks | |||||
echo "Starting swh-storage's listener" | |||||
exec python3 -m swh.storage.listener --verbose | |||||
;; | |||||
esac |
2>&1 to redirect stderr to stdout.