Move db polling after config generation

This commit is contained in:
Jordan Webb 2021-02-01 23:59:20 -06:00
parent 1dd6cbd895
commit 69051c05fb
No known key found for this signature in database
GPG Key ID: C341950C47B6CE14

View File

@ -2,15 +2,15 @@
set -euo pipefail set -euo pipefail
if [ ! -e "$PLEROMA_CONFIG_PATH" ] ; then
generate-pleroma-config.sh
fi
while ! pg_isready -U "${POSTGRES_USER:-pleroma}" -d "postgres://${POSTGRES_HOST:-postgres}:5432/${POSTGRES_DB:-pleroma}" -t 1; do while ! pg_isready -U "${POSTGRES_USER:-pleroma}" -d "postgres://${POSTGRES_HOST:-postgres}:5432/${POSTGRES_DB:-pleroma}" -t 1; do
echo "Waiting for ${POSTGRES_HOST-postgres} to come up..." >&2 echo "Waiting for ${POSTGRES_HOST-postgres} to come up..." >&2
sleep 1s sleep 1s
done done
if [ ! -e "$PLEROMA_CONFIG_PATH" ] ; then
generate-pleroma-config.sh
fi
pleroma_ctl migrate pleroma_ctl migrate
if [ "${USE_RUM:-n}" = "y" ] ; then if [ "${USE_RUM:-n}" = "y" ] ; then