mirror of
https://github.com/YunoHost-Apps/mastodon_ynh.git
synced 2024-09-03 19:46:02 +02:00
Ready to Yunohost 3 and Debian Stretch
This commit is contained in:
parent
2070a3fad9
commit
dcf41efbe5
7 changed files with 26 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0rc3.tar.gz
|
SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0.tar.gz
|
||||||
SOURCE_SUM=7e3a9ede97b15d4e3daf09bcc97bc00de7a88fd6d7fdc37dd124fa77b27c7d76
|
SOURCE_SUM=3d4904f30c28591333b1cf4c03173849dd6983ab00685f61e50e594160c672ee
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:media:clear
|
|
||||||
|
|
||||||
@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:push:refresh
|
|
||||||
|
|
||||||
@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:feeds:clear
|
|
||||||
|
|
||||||
@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:users:clear
|
|
|
@ -75,6 +75,7 @@ ynh_backup "/etc/cron.d/$app"
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE sources.list FILES
|
# BACKUP THE sources.list FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
ynh_backup "/etc/apt/sources.list.d/backports.list" "apt_backports.list"
|
ynh_backup "/etc/apt/sources.list.d/backports.list" "apt_backports.list"
|
||||||
|
fi
|
||||||
ynh_backup "/etc/apt/sources.list.d/yarn.list" "apt_yarn.list"
|
ynh_backup "/etc/apt/sources.list.d/yarn.list" "apt_yarn.list"
|
||||||
|
|
|
@ -80,7 +80,9 @@ if [[ "$arch" = arm* ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install source.list debian package backports & yarn
|
# Install source.list debian package backports & yarn
|
||||||
cp ../conf/backports.list /etc/apt/sources.list.d/
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
|
sudo cp ../conf/backports.list /etc/apt/sources.list.d/
|
||||||
|
fi
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
cp ../conf/yarn.list /etc/apt/sources.list.d/
|
cp ../conf/yarn.list /etc/apt/sources.list.d/
|
||||||
ynh_package_update
|
ynh_package_update
|
||||||
|
@ -214,13 +216,12 @@ sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "${fin
|
||||||
(
|
(
|
||||||
cd "$final_path/live"
|
cd "$final_path/live"
|
||||||
su mastodon <<INSTALL
|
su mastodon <<INSTALL
|
||||||
$final_path/.rbenv/versions/2.5.1/bin/gem install bundler
|
$final_path/.rbenv/versions/2.5.1/bin/gem install bundler
|
||||||
$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
|
$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
|
||||||
yarn install --production --no-progress --non-interactive --silent
|
yarn install --production --no-progress --non-interactive --silent
|
||||||
|
echo "SAFETY_ASSURED=1">> .env.production
|
||||||
echo "SAFETY_ASSURED=1">> .env.production
|
RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
|
||||||
RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
|
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
|
||||||
RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
|
|
||||||
INSTALL
|
INSTALL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -98,12 +98,13 @@ ynh_secure_remove /etc/cron.d/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE source.list
|
# REMOVE source.list
|
||||||
#=================================================
|
#=================================================
|
||||||
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
ynh_secure_remove /etc/apt/sources.list.d/backports.list
|
ynh_secure_remove /etc/apt/sources.list.d/backports.list
|
||||||
|
fi
|
||||||
ynh_secure_remove /etc/apt/sources.list.d/yarn.list
|
ynh_secure_remove /etc/apt/sources.list.d/yarn.list
|
||||||
|
|
||||||
# Delete ruby exec
|
# Delete ruby exec
|
||||||
ynh_secure_remove /usr/bin/ruby
|
#ynh_secure_remove /usr/bin/ruby
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -88,7 +88,9 @@ if [[ "$arch" = arm* ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install source.list debian package backports & yarn
|
# Install source.list debian package backports & yarn
|
||||||
cp ../conf/backports.list /etc/apt/sources.list.d/
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
|
cp ../conf/backports.list /etc/apt/sources.list.d/
|
||||||
|
fi
|
||||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
||||||
cp ../conf/yarn.list /etc/apt/sources.list.d/
|
cp ../conf/yarn.list /etc/apt/sources.list.d/
|
||||||
ynh_package_update
|
ynh_package_update
|
||||||
|
|
|
@ -130,7 +130,11 @@ ln -s $final_path/.rbenv/versions/2.5.1/bin/ruby /usr/bin/ruby || true
|
||||||
sudo su - $app <<MCOMMANDS
|
sudo su - $app <<MCOMMANDS
|
||||||
pushd ~/live
|
pushd ~/live
|
||||||
$final_path/.rbenv/versions/2.5.1/bin/gem install bundler
|
$final_path/.rbenv/versions/2.5.1/bin/gem install bundler
|
||||||
$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test
|
if [ "$(lsb_release --codename --short)" == "jessie" ]; then
|
||||||
|
$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test
|
||||||
|
else
|
||||||
|
$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --force --without development test
|
||||||
|
fi
|
||||||
yarn install --pure-lockfile
|
yarn install --pure-lockfile
|
||||||
MCOMMANDS
|
MCOMMANDS
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue