1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redmine_ynh.git synced 2024-09-03 20:16:16 +02:00
This commit is contained in:
ericgaspar 2020-12-23 12:00:55 +01:00
parent d43cc8bfc5
commit 28cb29f8d6
No known key found for this signature in database
GPG key ID: 574F281483054D44
3 changed files with 24 additions and 37 deletions

View file

@ -1,9 +1,9 @@
production: production:
adapter: postgresql adapter: postgresql
host: localhost database: __DB_NAME__
host: localhost
username: __DB_NAME__
password: __DB_PASSWORD__
encoding: utf8 encoding: utf8
database: yunobase schema_search_path: public
pool: 5
username: yunouser
password: yunopass
template: template0

View file

@ -5,7 +5,7 @@
#================================================= #=================================================
# dependencies used by the app # 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" RUBY_VERSION="2.6.6"
@ -48,8 +48,8 @@ SOURCE_SUM=80ad89ffe04c0b481503bd375f05c212bbc7d44ef5f5e649e0acdf25eba86736" > "
# Build an app.src for ruby-build # Build an app.src for ruby-build
mkdir -p "../conf" mkdir -p "../conf"
echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20201221.tar.gz echo "SOURCE_URL=https://github.com/rbenv/ruby-build/archive/v20200520.tar.gz
SOURCE_SUM=a1b71724f325e4003ea37fa618f7e0e8b334e77ffaf8ec1352931e123c9f2d3a" > "../conf/ruby-build.src" SOURCE_SUM=52be6908a94fbd4a94f5064e8b19d4a3baa4b773269c3884165518d83bcc8922" > "../conf/ruby-build.src"
# Download and extract ruby-build # Download and extract ruby-build
ynh_setup_source "$rbenv_install_dir/plugins/ruby-build" ruby-build ynh_setup_source "$rbenv_install_dir/plugins/ruby-build" ruby-build

View file

@ -78,9 +78,6 @@ ynh_install_ruby --ruby_version=$RUBY_VERSION
gem install bundler gem install bundler
bundle install --without development test
bundle exec rake generate_secret_token
#================================================= #=================================================
# CREATE A POSTGRESQL DATABASE # 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 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 "2.5.3" "2.3.3" "/opt/redmine/Gemfile"
ynh_replace_string "yunouser" "$db_name" "$final_path/config/database.yml" ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/config/database.yml"
ynh_replace_string "yunopass" "$db_pwd" "$final_path/config/database.yml" ynh_replace_string "__DB_PASSWORD__" "$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"
#=================================================
# MODIFY A CONFIG FILE
#=================================================
ynh_print_info "Install Redmine Conffiguration..."
cp -a ../conf/configuration.example.yml $final_path/config/configuration.yml
#================================================= #=================================================
# COMPILE REDMINE # COMPILE REDMINE
@ -128,9 +133,9 @@ ynh_replace_string "yunobase" "$db_name" "$final_path/config/database.yml"
ynh_print_info "Compile Redmine..." ynh_print_info "Compile Redmine..."
pushd $final_path pushd $final_path
bundle install --without development test rmagick bundle install --without development test rmagick
RAILS_ENV=production bin/rake generate_secret_token RAILS_ENV=production bin/rake generate_secret_token
RAILS_ENV=production bin/rake db:migrate RAILS_ENV=production bin/rake db:migrate
popd popd
#================================================= #=================================================
@ -147,24 +152,6 @@ systemctl enable $app.service
# Create a dedicated nginx config # Create a dedicated nginx config
ynh_add_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 # GENERIC FINALIZATION
#================================================= #=================================================