move database ready check into init container

This commit is contained in:
red 2025-03-06 23:40:47 -05:00
parent 64dc13b3ad
commit ea4bd5e94d
2 changed files with 12 additions and 3 deletions

View file

@ -2,12 +2,10 @@
set -e
# Move the files that were built into the image into the directory they will be served from
mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static
cp -rf /static-files/* ${DATA}/static
echo "-- Waiting for database..."
while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:${DB_PORT:-5432}/${DB_NAME:-pleroma} -t 1; do sleep 1s; done;
echo $DB_PASSWORD
echo "-- Running migrations..."
$HOME/bin/pleroma_ctl migrate