1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redmine_ynh.git synced 2024-09-03 20:16:16 +02:00

Merge branch 'testing' into fix

This commit is contained in:
ericgaspar 2022-04-13 13:54:40 +02:00
commit 5f407edc09
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 9 additions and 35 deletions

View file

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

View file

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

View file

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

View file

@ -25,7 +25,7 @@ ynh_abort_if_errors
#================================================= #=================================================
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url="/"
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -66,7 +66,7 @@ ynh_app_setting_set --app=$app --key=port --value=$port
ynh_script_progression --message="Installing dependencies..." ynh_script_progression --message="Installing dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies
ynh_install_ruby --ruby_version=$ruby_version ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -120,12 +120,10 @@ ynh_add_nginx_config
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..."
ynh_add_config --template="../conf/database.example.yml" --destination="$final_path/config/database.yml" ynh_add_config --template="../conf/database.example.yml" --destination="$final_path/config/database.yml"
chmod 400 "$final_path/config/database.yml" chmod 400 "$final_path/config/database.yml"
chown $app:$app "$final_path/config/database.yml" chown $app:$app "$final_path/config/database.yml"
ynh_add_config --template="../conf/configuration.yml.example" --destination="$final_path/config/configuration.yml" ynh_add_config --template="../conf/configuration.yml.example" --destination="$final_path/config/configuration.yml"
chmod 400 "$final_path/config/configuration.yml" chmod 400 "$final_path/config/configuration.yml"
chown $app:$app "$final_path/config/configuration.yml" chown $app:$app "$final_path/config/configuration.yml"
@ -150,7 +148,7 @@ pushd $final_path
#ynh_exec_warn_less bundle exec rake redmine:load_default_data RAILS_ENV=production #ynh_exec_warn_less bundle exec rake redmine:load_default_data RAILS_ENV=production
popd popd
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
chmod 750 "$final_path/public" chmod 750 "$final_path/public"
chmod -R o-rwx "$final_path/public" chmod -R o-rwx "$final_path/public"

View file

@ -79,7 +79,7 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies
ynh_install_ruby --ruby_version=$ruby_version ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version
#================================================= #=================================================
# RESTORE THE POSTGRESQL DATABASE # RESTORE THE POSTGRESQL DATABASE
@ -104,7 +104,7 @@ pushd $final_path
bundle install bundle install
popd popd
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
chmod 750 "$final_path/public" chmod 750 "$final_path/public"
chmod -R o-rwx "$final_path/public" chmod -R o-rwx "$final_path/public"

View file

@ -65,7 +65,6 @@ ynh_script_progression --message="Ensuring downward compatibility..."
# Cleaning legacy permissions # Cleaning legacy permissions
if ynh_legacy_permissions_exists; then if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi
@ -110,24 +109,8 @@ ynh_add_nginx_config
ynh_script_progression --message="Upgrading dependencies..." 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_app_dependencies $pkg_dependencies $build_pkg_dependencies
ynh_install_ruby --ruby_version=$ruby_version
#================================================= ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version
# SPECIFIC UPGRADE
#=================================================
# ADD A CONFIGURATION
#=================================================
# ynh_script_progression --message="Adding a configuration file..."
# ynh_add_config --template="../conf/database.example.yml" --destination="$final_path/config/database.yml"
# chmod 400 "$final_path/config/database.yml"
# chown $app:$app "$final_path/config/database.yml"
# ynh_add_config --template="../conf/configuration.yml.example" --destination="$final_path/config/configuration.yml"
# chmod 400 "$final_path/config/configuration.yml"
# chown $app:$app "$final_path/config/configuration.yml"
#================================================= #=================================================
# BUILD APP # BUILD APP
@ -143,7 +126,7 @@ pushd $final_path
ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production
popd popd
ynh_install_app_dependencies $pkg_dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
chmod 750 "$final_path/public" chmod 750 "$final_path/public"
chmod -R o-rwx "$final_path/public" chmod -R o-rwx "$final_path/public"