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,5 @@
#!/bin/bash
echo "postfix starting..."
exec /usr/lib/postfix/master

View File

@@ -0,0 +1,8 @@
#!/bin/bash
echo "postgres starting..."
mkdir -p /state/db
chown mastodon:mastodon /state/db
exec chpst -u mastodon:mastodon /usr/lib/postgresql/bin/postmaster \
-D /state/db 2>&1

View File

@@ -0,0 +1,5 @@
#!/bin/bash
mkdir -p /state/redis
chown mastodon:mastodon /state/redis
exec chpst -u mastodon:mastodon /usr/bin/redis-server /etc/redis/redis.conf

View File

@@ -0,0 +1,14 @@
#!/bin/bash
sleep 2
while [[ -e /state/.starting ]]; do
sleep 1
done
echo "sidekiq starting..."
cd /mastodon/app
exec \
envdir /state/envdir \
chpst -u mastodon:mastodon \
bash -c "bundle exec sidekiq -c $SIDEKIQ_WORKERS -q default -q push -q pull -q mailers"

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

View File

@@ -0,0 +1,11 @@
#!/bin/bash
sleep 2
while [[ -e /state/.starting ]]; do
sleep 1
done
echo "streaming starting..."
cd /mastodon/app
exec envdir /state/envdir chpst -u mastodon:mastodon bash -c "npm run start"

View File

@@ -0,0 +1,11 @@
#!/bin/bash
sleep 2
while [[ -e /state/.starting ]]; do
sleep 1
done
echo "web starting..."
cd /mastodon/app
exec envdir /state/envdir chpst -u mastodon:mastodon bash -c "bundle exec puma -C config/puma.rb"