feat(docker-compose): add worker as service

This commit is contained in:
Ali BARIN
2022-09-07 23:02:20 +02:00
parent 3755a3ce4c
commit 29a9338ad7
6 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -e
until psql -h "$POSTGRES_HOST" -U "$POSTGRES_USERNAME" -d "$POSTGRES_HOST" -c '\q'; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
>&2 echo "Postgres is up - executing command"
exec "$@"