#!/bin/sh
set -e
export LANG=en_US.UTF-8
export USER=pleroma
echo "-- Waiting for database..."
while ! pg_isready; do
sleep 1
done
echo "-- Running migrations..."
/opt/pleroma/bin/pleroma_ctl migrate
echo "-- Starting!"
touch /tmp/.pleroma-ever-started
exec /opt/pleroma/bin/pleroma start