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:
Éric Gaspar 2022-04-13 19:38:47 +02:00 committed by GitHub
commit b15491abb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 4 deletions

View file

@ -5,7 +5,7 @@
is_public=1
; Checks
pkg_linter=1
setup_sub_dir=0
setup_sub_dir=1
setup_root=1
setup_nourl=0
setup_private=1

View file

@ -1,4 +1,5 @@
location / {
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_pass http://127.0.0.1:__PORT__/;
proxy_redirect off;

View file

@ -32,6 +32,12 @@
"name": "domain",
"type": "domain"
},
{
"name": "path",
"type": "path",
"example": "/redmine",
"default": "/redmine"
},
{
"name": "is_public",
"type": "boolean",

View file

@ -25,7 +25,7 @@ ynh_abort_if_errors
#=================================================
domain=$YNH_APP_ARG_DOMAIN
path_url="/"
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME
@ -127,6 +127,11 @@ ynh_add_config --template="../conf/configuration.yml.example" --destination="$fi
chmod 400 "$final_path/config/configuration.yml"
chown $app:$app "$final_path/config/configuration.yml"
if [[ "$path_url" != "/" ]]
then
echo "Redmine::Utils::relative_url_root = '$path_url'" >> "$final_path/config/environment.rb"
fi
#=================================================
# BUILD APP
#=================================================

View file

@ -85,7 +85,7 @@ then
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/database.yml $final_path/config/configuration.yml"
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config/database.yml $final_path/config/configuration.yml $final_path/config/environment.rb"
fi
mkdir -p "$final_path/files" "$final_path/log" "$final_path/tmp" "$final_path/public/plugin_assets"
@ -109,6 +109,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Upgrading dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies
ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version
#=================================================