Add database migrations service

This commit is contained in:
iPromKnight
2024-03-09 19:52:17 +00:00
parent cee1eeb0ab
commit e48e968fb8
5 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
#!/bin/sh
export WAIT_HOSTS="${POSTGRES_HOST}:${POSTGRES_PORT}"
export WAIT_BEFORE=3
export WAIT_TIMEOUT=15
./wait && \
pgmigrate apply -d "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"