~singpolyma/soapbox-fly

716f71c87d9ffb769f47980d0d340ff426ff2141 — Stephen Paul Weber a month ago d3611c1
Fix db config migration
2 files changed, 10 insertions(+), 2 deletions(-)

M entrypoint.sh
M start_pleroma.sh
M entrypoint.sh => entrypoint.sh +9 -2
@@ 24,8 24,15 @@ if [ ! -d /data/postgres ]; then
		while ! pg_isready; do
			sleep 1
		done
		su postgres -c 'psql -c "CREATE ROLE pleroma LOGIN"'
		su postgres -c 'psql -c "CREATE DATABASE pleroma WITH OWNER pleroma"'
		runuser -u postgres -- psql -c "CREATE ROLE pleroma LOGIN"
		runuser -u postgres -- psql -c "CREATE DATABASE pleroma WITH OWNER pleroma"

		while [ ! -f /tmp/.pleroma-ever-started ]; do
			sleep 1
		done

		runuser -u pleroma -- /opt/pleroma/bin/pleroma_ctl config migrate_to_db
		echo "config :pleroma, configurable_from_database: true" >> /data/pleroma/config.exs
	) &
fi


M start_pleroma.sh => start_pleroma.sh +1 -0
@@ 14,4 14,5 @@ echo "-- Running migrations..."
/opt/pleroma/bin/pleroma_ctl migrate

echo "-- Starting!"
touch /tmp/.pleroma-ever-started
exec /opt/pleroma/bin/pleroma start