mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
⚡ added update scripts for dev and prod envs
Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
This commit is contained in:
commit
b3c8105a52
13
check_services.sh
Normal file
13
check_services.sh
Normal file
@ -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
Normal file
18
update_dev.sh
Normal file
@ -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
Normal file
16
update_prod.sh
Normal file
@ -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…
Reference in New Issue
Block a user