From c63e663532b8c70c4f4ec19be91dd644c5752d4f Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Thu, 6 Feb 2020 11:35:42 +0100 Subject: [PATCH] Update install --- conf/systemd.service | 3 ++- scripts/install | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 7da85e2..21e65dd 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,7 +11,8 @@ Environment=RAILS_ENV=production Environment="PORT=__PORT_WEB__" #ExecStart=/opt/yunohost/snserver/rails s >> /var/log/snserver/snserver.log 2>&1 #ExecStart=__FINALPATH__/bin/rails s -e production >> /var/log/__APP__/__APP__.log 2>&1 -ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb +#ExecStart=/opt/rbenv/versions/2.6.5/bin/bundle exec puma -C config/puma.rb +ExecStart=/opt/rbenv/versions/2.6.5/bin/rails s -b 0.0.0.0 >> /var/log/__APP__/__APP__.log 2>&1 ExecReload=/bin/kill -SIGUSR1 $MAINPID StandardError=syslog Restart=always diff --git a/scripts/install b/scripts/install index 0765761..e8f7e91 100755 --- a/scripts/install +++ b/scripts/install @@ -176,7 +176,9 @@ ynh_script_progression --message="Installing Ruby..." --time --weight=321 ruby_version="2.6.5" ynh_install_ruby --ruby_version=$ruby_version /opt/rbenv/versions/$ruby_version/bin/gem update --system -/opt/rbenv/versions/$ruby_version/bin/gem install bundler:1.17.1 --no-document +/opt/rbenv/versions/$ruby_version/bin/gem install bundler --no-document +/opt/rbenv/versions/$ruby_version/bin/gem install bundle --no-document +/opt/rbenv/versions/$ruby_version/bin/gem install rails --no-document #================================================= # MODIFY A CONFIG FILE @@ -214,10 +216,11 @@ pushd "$final_path/live" ynh_use_nodejs # sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/$ruby_version/bin/bundle config set path 'vendor/bundle' # sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/$ruby_version/bin/bundle config set with 'development' - sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/$ruby_version/bin/bundle install --path "vendor/bundle" + # sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/$ruby_version/bin/bundle install --path "vendor/bundle" #sudo -u "$app" env PATH=$PATH /opt/rbenv/versions/$ruby_version/bin/bundle update --bundler - sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile + # sudo -u "$app" env PATH=$PATH yarn install --pure-lockfile #sudo -u "$app" env PATH=$PATH yarn run build --pure-lockfile + sudo -u "$app" npm run build popd #=================================================