Run migrations when installing

This throws errors, but they can be ignored.
This commit is contained in:
Scott Weldon
2023-12-25 10:29:35 -08:00
parent 4d52431c95
commit 7784559b85

View File

@ -82,6 +82,7 @@ provisioner() {
-c "SELECT 1 FROM pg_catalog.pg_tables WHERE schemaname = 'public';")"
if [ "$TABLES_EXIST" == "" ]; then
echo "Installing Wallabag ..."
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
install_wallabag
else
echo "WARN: Postgres database is already configured. Remove the environment variable with root password."