move database ready check into init container
This commit is contained in:
parent
64dc13b3ad
commit
ea4bd5e94d
2 changed files with 12 additions and 3 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue