mirror of
https://github.com/YunoHost-Apps/glitchsoc_ynh.git
synced 2024-09-03 19:15:59 +02:00
RBENV_ROOT
This commit is contained in:
parent
b2af9c3f5e
commit
9691d954dc
4 changed files with 16 additions and 16 deletions
|
@ -9,7 +9,7 @@ WorkingDirectory=__FINALPATH__/live
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="DB_POOL=25"
|
Environment="DB_POOL=25"
|
||||||
Environment="MALLOC_ARENA_MAX=2"
|
Environment="MALLOC_ARENA_MAX=2"
|
||||||
ExecStart=/opt/rbenv/versions/__APP__/bin/bundle exec sidekiq -c 25
|
ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec sidekiq -c 25
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
Restart=always
|
Restart=always
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
|
|
|
@ -8,7 +8,7 @@ User=__APP__
|
||||||
WorkingDirectory=__FINALPATH__/live
|
WorkingDirectory=__FINALPATH__/live
|
||||||
Environment="RAILS_ENV=production"
|
Environment="RAILS_ENV=production"
|
||||||
Environment="PORT=__PORT_WEB__"
|
Environment="PORT=__PORT_WEB__"
|
||||||
ExecStart=/opt/rbenv/versions/__APP__/bin/bundle exec puma -C config/puma.rb
|
ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec puma -C config/puma.rb
|
||||||
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
ExecReload=/bin/kill -SIGUSR1 $MAINPID
|
||||||
TimeoutSec=15
|
TimeoutSec=15
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
|
@ -144,8 +144,8 @@ ynh_script_progression --message="Installing Ruby..."
|
||||||
|
|
||||||
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
ynh_install_ruby --ruby_version=$RUBY_VERSION
|
||||||
pushd "$final_path/live"
|
pushd "$final_path/live"
|
||||||
/opt/rbenv/versions/$app/bin/gem update --system
|
$RBENV_ROOT/versions/$app/bin/gem update --system
|
||||||
/opt/rbenv/versions/$app/bin/gem install bundler:$BUNDLER_VERSION --no-document
|
$RBENV_ROOT/versions/$app/bin/gem install bundler:$BUNDLER_VERSION --no-document
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -188,14 +188,14 @@ chown -R "$app": "$final_path"
|
||||||
|
|
||||||
pushd "$final_path/live"
|
pushd "$final_path/live"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config deployment 'true'
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config deployment 'true'
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config without 'development test'
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config without 'development test'
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
sudo -u $app PATH=$PATH yarn install --pure-lockfile
|
sudo -u $app PATH=$PATH yarn install --pure-lockfile
|
||||||
echo "SAFETY_ASSURED=1">> $config
|
echo "SAFETY_ASSURED=1">> $config
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails db:setup --quiet
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails db:setup --quiet
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:precompile --quiet
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:precompile --quiet
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null
|
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=admin > /dev/null
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts modify "$admin" --approve
|
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl accounts modify "$admin" --approve
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -262,13 +262,13 @@ chown -R "$app": "$final_path"
|
||||||
|
|
||||||
pushd "$final_path/live"
|
pushd "$final_path/live"
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config deployment 'true'
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config deployment 'true'
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle config without 'development test'
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle config without 'development test'
|
||||||
sudo -u $app PATH=$PATH /opt/rbenv/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
sudo -u $app PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
|
||||||
sudo -u $app PATH=$PATH yarn install --pure-lockfile
|
sudo -u $app PATH=$PATH yarn install --pure-lockfile
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:clean
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:clean
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails assets:precompile
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails assets:precompile
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH /opt/rbenv/versions/$app/bin/bundle exec rails db:migrate
|
sudo -u $app RAILS_ENV=production PATH=$PATH $RBENV_ROOT/versions/$app/bin/bundle exec rails db:migrate
|
||||||
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl cache clear
|
sudo -u $app RAILS_ENV=production PATH=$PATH bin/tootctl cache clear
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue