Browse Source

added update scripts for dev and prod envs

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
feature/markdown-support
Baptiste Lemoine 2 years ago
parent
commit
b3c8105a52
  1. 13
      check_services.sh
  2. 18
      update_dev.sh
  3. 16
      update_prod.sh

13
check_services.sh

@ -0,0 +1,13 @@
#!/bin/bash
echo "########## time to check the services, this script must be run with an user able to manage services, someone with sudo rights for example"
sudo service postgresql status
sudo service mastodon-* status
echo "########## run:
sudo service mastodon-* restart
and check that everything is working fine
sudo journalctl -feu mastodon-*
"

18
update_dev.sh

@ -0,0 +1,18 @@
#!/bin/bash
## script must be run with the mastodon user
echo "ruby version is":
ruby -v
echo "needed version is":
cat .ruby-version
echo "########## time to update mastodon. you need to pull your git branch before running this script."
git remote -v
git pull origin master
echo "########## install back end updates "
bundle install
bundle exec rake db:migrate
echo "########## install front end updates "
bundle exec rails assets:precompile
echo "########## check the services "
echo "########## now time to restart web services "
foreman start

16
update_prod.sh

@ -0,0 +1,16 @@
#!/bin/bash
## script must be run with the mastodon user
cd /home/mastodon/live/
echo "ruby version is":
ruby -v
echo "needed version is":
cat .ruby-version
echo "########## time to update mastodon. you need to pull your git branch before running this script."
git remote -v
echo "########## install back end updates "
RAILS_ENV=production bundle install
RAILS_ENV=production bundle exec rake db:migrate
echo "########## install front end updates "
RAILS_ENV=production bundle exec rails assets:precompile
echo "########## check the services "
echo "########## now time to restart web services "
Loading…
Cancel
Save