about ready to start testingabout ready to start testing
This commit is contained in:
5
rootfs/etc/service/postfix/run
Normal file
5
rootfs/etc/service/postfix/run
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "postfix starting..."
|
||||
|
||||
exec /usr/lib/postfix/master
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
25
rootfs/etc/service/startup/run
Normal file
25
rootfs/etc/service/startup/run
Normal 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
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user