mirror of
https://github.com/YunoHost-Apps/redmine_ynh.git
synced 2024-09-03 20:16:16 +02:00
Install ruby as user
This commit is contained in:
parent
6b92f62e18
commit
3ba539315e
4 changed files with 18 additions and 23 deletions
|
@ -10,6 +10,17 @@ ruby_version=3.1
|
|||
# PERSONAL HELPERS
|
||||
#=================================================
|
||||
|
||||
_redmine_ruby_install() {
|
||||
pushd "$install_dir"
|
||||
ynh_use_ruby
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ynh_gem" update --system --no-document
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ynh_gem" install bundler passenger --no-document
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" bundle config set --local without 'development test rmagick'
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" bundle add 'webrick' --version '~> 1.7'
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" bundle install
|
||||
popd
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# EXPERIMENTAL HELPERS
|
||||
#=================================================
|
||||
|
|
|
@ -53,15 +53,11 @@ chown "$app:$app" "$install_dir/config/configuration.yml"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app..." --weight=1
|
||||
|
||||
_redmine_ruby_install
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_ruby
|
||||
ynh_gem update --system --no-document
|
||||
ynh_gem install bundler passenger --no-document
|
||||
bundle config set --local without 'development test rmagick'
|
||||
bundle add 'webrick' --version '~> 1.7'
|
||||
bundle install
|
||||
ynh_exec_warn_less bundle exec rake generate_secret_token RAILS_ENV=production
|
||||
ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" ynh_exec_warn_less bundle exec rake generate_secret_token RAILS_ENV=production
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
||||
#ynh_exec_warn_less bundle exec rake redmine:load_default_data RAILS_ENV=production
|
||||
popd
|
||||
|
||||
|
|
|
@ -43,14 +43,7 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app..." --weight=1
|
||||
|
||||
pushd "$install_dir"
|
||||
ynh_use_ruby
|
||||
ynh_gem update --system --no-document
|
||||
ynh_gem install bundler passenger --no-document
|
||||
bundle config set --local without 'development test rmagick'
|
||||
bundle add 'webrick' --version '~> 1.7'
|
||||
bundle install
|
||||
popd
|
||||
_redmine_ruby_install
|
||||
|
||||
chmod 750 "$install_dir/public"
|
||||
chmod -R o-rwx "$install_dir/public"
|
||||
|
|
|
@ -47,14 +47,9 @@ chown -R "$app:www-data" "$install_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Building app..." --weight=1
|
||||
|
||||
_redmine_ruby_install
|
||||
pushd "$install_dir"
|
||||
ynh_use_ruby
|
||||
ynh_gem update --system --no-document
|
||||
ynh_gem install bundler passenger --no-document
|
||||
bundle config set --local without 'development test rmagick'
|
||||
bundle add 'webrick' --version '~> 1.7'
|
||||
bundle install
|
||||
ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
||||
ynh_exec_as "$app" "$ynh_ruby_load_path" ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
|
||||
popd
|
||||
|
||||
# Setting up LDAP authentification
|
||||
|
|
Loading…
Add table
Reference in a new issue