about ready to start testingabout ready to start testing

This commit is contained in:
2019-12-07 22:50:36 -08:00
parent bf6a0dc199
commit c7b081f5b9
10 changed files with 107 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
touch /state/.starting
echo "mastodon-startup starting up..."
if [[ ! -d /state/envdir ]]; then
mkdir -p /state/envdir
chown mastodon:mastodon /state/envdir
fi
if [[ ! -e /state/envdir/HOME ]]; then
echo "/mastodon" > /state/envdir/HOME
fi
cd /mastodon/app
if [ "$RUN_DB_MIGRATIONS" == "true" ]; then
echo "Running database migrations..."
envdir /state/envdir chpst -u mastodon:mastodon bash -c "bundle exec rake db:migrate"
fi
rm /state/.starting
while true ; do
sleep 86400
done