mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
[fix] Remove db:setup
This commit is contained in:
parent
77a80d633c
commit
2778b0d53e
1 changed files with 18 additions and 18 deletions
|
@ -121,17 +121,10 @@ sudo su -c "psql" postgres <<< \
|
|||
ynh_psql_create_db_without_password "$app"
|
||||
|
||||
# Setup database
|
||||
sudo su - $app <<SCOMMANDS
|
||||
cd ~/live
|
||||
RAILS_ENV=production bin/bundle exec rails db:setup
|
||||
SCOMMANDS
|
||||
|
||||
# Restore Mastodon
|
||||
sudo su - $app <<RCOMMANDS
|
||||
cd ~/live
|
||||
RAILS_ENV=production bin/bundle exec rails db:migrate
|
||||
RAILS_ENV=production bin/bundle exec rails assets:precompile
|
||||
RCOMMANDS
|
||||
#sudo su - $app <<SCOMMANDS
|
||||
#cd ~/live
|
||||
#RAILS_ENV=production bin/bundle exec rails db:setup
|
||||
#SCOMMANDS
|
||||
|
||||
# copy database dump
|
||||
sudo cp $YNH_APP_BACKUP_DIR/mastodon_db.sql $final_path
|
||||
|
@ -150,6 +143,13 @@ ynh_secure_remove $final_path/mastodon_db.sql
|
|||
# Create symlink for ruby
|
||||
sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true
|
||||
|
||||
# Restore Mastodon
|
||||
sudo su - $app <<RCOMMANDS
|
||||
cd ~/live
|
||||
RAILS_ENV=production bin/bundle exec rails db:migrate
|
||||
RAILS_ENV=production bin/bundle exec rails assets:precompile
|
||||
RCOMMANDS
|
||||
|
||||
# Restore nginx configuration files
|
||||
sudo cp -a ./nginx.conf "$nginx_conf"
|
||||
# Restore crontab
|
||||
|
|
Loading…
Add table
Reference in a new issue