Skip to content

Instantly share code, notes, and snippets.

@lindwurm
Last active November 9, 2018 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindwurm/0f61dff1d58c19b1f7a253553b64d1b5 to your computer and use it in GitHub Desktop.
Save lindwurm/0f61dff1d58c19b1f7a253553b64d1b5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# example
instance = "mstdn.maud.io"
cd ~/live
echo "へいますたー!" | toot
git pull
# ここはverup時だけ
# bundle install --deployment --without development test
# yarn install --pure-lockfile
# RAILS_ENV=production bundle exec rails db:migrate
echo "ぷりこんぱいる?" | toot
RAILS_ENV=production bundle exec rails assets:precompile
echo "でっぷろーい!" | toot
sleep 5s
# non-docker
sudo systemctl restart mastodon-*
while true; do
DonAlive=$(curl -s -o /dev/null -I -w "%{http_code}\n" https://${instance}/)
if [ $DonAlive -eq 302 ]; then
break
fi
echo "しっぱい… 5s後に再試行するよ"
sleep 5s
done
echo "だん!" | toot
@lindwurm
Copy link
Author

lindwurm commented Nov 2, 2018

require

howto

wget -O deploy.sh https://gist.githubusercontent.com/lindwurm/0f61dff1d58c19b1f7a253553b64d1b5/raw/deploy_non-docker.sh && chmod +x deploy.sh
./deploy.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment