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:
liberodark 2019-03-13 14:38:59 +01:00
parent 3b7ae298fd
commit e43b126233
3 changed files with 10 additions and 12 deletions

View file

@ -1,7 +1,7 @@
production:
adapter: postgresql
host: localhost
encoding: unicode
encoding: utf8
database: yunobase
pool: 5
username: yunouser

View file

@ -1,5 +1,5 @@
[Unit]
Description=Pia Backend
Description=Redmine
Requires=network.target
Requires=postgresql.service
@ -7,9 +7,9 @@ Requires=postgresql.service
Type=simple
User=root
Group=users
WorkingDirectory=/opt/pia-back
WorkingDirectory=/opt/redmine
Environment=RAILS_SERVE_STATIC_FILES=true
ExecStart=/bin/bash -c "/opt/pia-back/bin/rails s -e production -b 127.0.0.1 -p 3000"
ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000"
TimeoutSec=30
RestartSec=15s
Restart=always

View file

@ -47,7 +47,7 @@ app=$YNH_APP_INSTANCE_NAME
### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
final_path=/var/www/$app
final_path=/opt/$app
test ! -e "$final_path" || ynh_die "This path already contains a folder"
# Normalize the url path syntax
@ -144,14 +144,12 @@ ynh_setup_source "$final_path"
#=================================================
ynh_print_info "Install Redmine Conffiguration..."
rm /opt/pia-back/config/database.example.yml
cp -a ../conf/database.example.yml /opt/pia-back/config/database.yml
cp -a ../conf/pias_controller.rb /opt/pia-back/app/controllers/pias_controller.rb
cp -a ../conf/database.example.yml $final_path/config/database.yml
ynh_replace_string "2.5.3" "2.3.3" "/opt/pia-back/Gemfile"
ynh_replace_string "yunouser" "$db_name" "/opt/pia-back/config/database.yml"
ynh_replace_string "yunopass" "$db_pwd" "/opt/pia-back/config/database.yml"
ynh_replace_string "yunobase" "$db_name" "/opt/pia-back/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"
#=================================================
# COMPILE PIA BACK