diff --git a/conf/database.example.yml b/conf/database.example.yml index 588e8f6..c1ee248 100644 --- a/conf/database.example.yml +++ b/conf/database.example.yml @@ -1,9 +1,9 @@ production: - adapter: postgresql - host: localhost + adapter: postgresql + database: __DB_NAME__ + host: localhost + username: __DB_NAME__ + password: __DB_PASSWORD__ encoding: utf8 - database: yunobase - pool: 5 - username: yunouser - password: yunopass - template: template0 + schema_search_path: public + diff --git a/scripts/_common.sh b/scripts/_common.sh index 13fd13e..c3c6841 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # dependencies used by the app -pkg_dependencies="postgresql ruby-dev zlib1g-dev libpq-dev" +pkg_dependencies="postgresql ruby-dev zlib1g-dev libpq-dev build-essential libxslt1-dev libxml2-dev imagemagick libmagickwand-dev" RUBY_VERSION="2.6.6" @@ -48,8 +48,8 @@ SOURCE_SUM=80ad89ffe04c0b481503bd375f05c212bbc7d44ef5f5e649e0acdf25eba86736" > " # Build an app.src for ruby-build mkdir -p "../conf" - echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz -SOURCE_SUM=a1b71724f325e4003ea37fa618f7e0e8b334e77ffaf8ec1352931e123c9f2d3a" > "../conf/ruby-build.src" + echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20200520.tar.gz +SOURCE_SUM=52be6908a94fbd4a94f5064e8b19d4a3baa4b773269c3884165518d83bcc8922" > "../conf/ruby-build.src" # Download and extract ruby-build ynh_setup_source "$rbenv_install_dir/plugins/ruby-build" ruby-build diff --git a/scripts/install b/scripts/install index c6407c4..7f06011 100644 --- a/scripts/install +++ b/scripts/install @@ -78,9 +78,6 @@ ynh_install_ruby --ruby_version=$RUBY_VERSION gem install bundler -bundle install --without development test -bundle exec rake generate_secret_token - #================================================= # CREATE A POSTGRESQL DATABASE #================================================= @@ -118,9 +115,17 @@ ynh_print_info "Install Redmine Conffiguration..." cp -a ../conf/database.example.yml $final_path/config/database.yml #ynh_replace_string "2.5.3" "2.3.3" "/opt/redmine/Gemfile" -ynh_replace_string "yunouser" "$db_name" "$final_path/config/database.yml" -ynh_replace_string "yunopass" "$db_pwd" "$final_path/config/database.yml" -ynh_replace_string "yunobase" "$db_name" "$final_path/config/database.yml" +ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config/database.yml" +ynh_replace_string "__DB_PASSWORD__" "$db_pwd" "$final_path/config/database.yml" +ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config/database.yml" + + +#================================================= +# MODIFY A CONFIG FILE +#================================================= +ynh_print_info "Install Redmine Conffiguration..." + +cp -a ../conf/configuration.example.yml $final_path/config/configuration.yml #================================================= # COMPILE REDMINE @@ -128,9 +133,9 @@ ynh_replace_string "yunobase" "$db_name" "$final_path/config/database.yml" ynh_print_info "Compile Redmine..." pushd $final_path -bundle install --without development test rmagick -RAILS_ENV=production bin/rake generate_secret_token -RAILS_ENV=production bin/rake db:migrate + bundle install --without development test rmagick + RAILS_ENV=production bin/rake generate_secret_token + RAILS_ENV=production bin/rake db:migrate popd #================================================= @@ -147,24 +152,6 @@ systemctl enable $app.service # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# MODIFY A CONFIG FILE -#================================================= -#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf -#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "/etc/loolwsd/loolwsd.xml" -#ynh_replace_string "__PASSWORD__" "$password" "/etc/loolwsd/loolwsd.xml" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -### `ynh_store_file_checksum` is used to store the checksum of a file. -### That way, during the upgrade script, by using `ynh_backup_if_checksum_is_different`, -### you can make a backup of this file before modifying it again if the admin had modified it. - -# Calculate and store the config file checksum into the app settings -#ynh_store_file_checksum "/etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf" - #================================================= # GENERIC FINALIZATION #=================================================