diff --git a/check_process b/check_process index 45932b4..8874011 100644 --- a/check_process +++ b/check_process @@ -5,7 +5,7 @@ is_public=1 ; Checks pkg_linter=1 - setup_sub_dir=1 + setup_sub_dir=0 setup_root=1 setup_nourl=0 setup_private=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 0d5ce06..748b3cb 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,4 @@ -#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { +location / { proxy_pass http://127.0.0.1:__PORT__/; proxy_redirect off; diff --git a/manifest.json b/manifest.json index 713381e..961f9cb 100644 --- a/manifest.json +++ b/manifest.json @@ -32,12 +32,6 @@ "name": "domain", "type": "domain" }, - { - "name": "path", - "type": "path", - "example": "/red", - "default": "/red" - }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index 05f7097..3694662 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC 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_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 @@ -120,12 +120,10 @@ ynh_add_nginx_config 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" @@ -150,7 +148,7 @@ pushd $final_path #ynh_exec_warn_less bundle exec rake redmine:load_default_data RAILS_ENV=production popd -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies chmod 750 "$final_path/public" chmod -R o-rwx "$final_path/public" diff --git a/scripts/restore b/scripts/restore index d324679..bf72665 100644 --- a/scripts/restore +++ b/scripts/restore @@ -79,7 +79,7 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install 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 @@ -104,7 +104,7 @@ pushd $final_path bundle install popd -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies chmod 750 "$final_path/public" chmod -R o-rwx "$final_path/public" diff --git a/scripts/upgrade b/scripts/upgrade index 22757ea..9a3280e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,7 +65,6 @@ ynh_script_progression --message="Ensuring downward compatibility..." # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all - ynh_app_setting_delete --app=$app --key=is_public fi @@ -110,24 +109,8 @@ ynh_add_nginx_config ynh_script_progression --message="Upgrading dependencies..." ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies $build_pkg_dependencies -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" +ynh_exec_warn_less ynh_install_ruby --ruby_version=$ruby_version #================================================= # BUILD APP @@ -143,7 +126,7 @@ pushd $final_path ynh_exec_warn_less bundle exec rake db:migrate RAILS_ENV=production popd -ynh_install_app_dependencies $pkg_dependencies +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies chmod 750 "$final_path/public" chmod -R o-rwx "$final_path/public"