diff --git a/conf/nginx.conf b/conf/nginx.conf index 19aa92b..244e4cc 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,4 @@ +#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { # Force usage of https @@ -23,5 +24,4 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; more_clear_input_headers 'Accept-Encoding'; - } diff --git a/conf/systemd.service b/conf/systemd.service index 9ce2147..09bd16c 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,13 +1,13 @@ [Unit] -Description=Facilmap: collaborative maps with a straightforward interface +Description=Facilmap: collaborative maps After=network.target [Service] Type=simple -Environment=NODE_ENV=production -Environment=DOTENV_CONFIG_PATH=__FINALPATH__/etc/facilmap.env User=__APP__ Group=__APP__ +Environment=NODE_ENV=production +Environment=DOTENV_CONFIG_PATH=__FINALPATH__/etc/facilmap.env Environment="__YNH_NODE_LOAD_PATH__" ExecStart=__FINALPATH__/bin/facilmap-server WorkingDirectory=__FINALPATH__ diff --git a/scripts/backup b/scripts/backup index ff28e6a..ca47243 100755 --- a/scripts/backup +++ b/scripts/backup @@ -37,11 +37,6 @@ db_name=$(ynh_app_setting_get --app=$app --key=db_name) #================================================= ynh_print_info --message="Declaring files to be backed up..." -### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs -### to be backuped and not an actual copy of any file. The actual backup that -### creates and fill the archive with the files happens in the core after this -### script is called. Hence ynh_backups calls takes basically 0 seconds to run. - #================================================= # BACKUP THE APP MAIN DIR #================================================= @@ -73,9 +68,6 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= ynh_print_info --message="Backing up the MySQL database..." -### (However, things like MySQL dumps *do* take some time to run, though the -### copy of the generated dump to the archive still happens later) - ynh_mysql_dump_db --database="$db_name" > db.sql #================================================= diff --git a/scripts/change_url b/scripts/change_url index a7a4dba..2de6c6f 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -28,12 +28,6 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 # Needed for helper "ynh_add_nginx_config" final_path=$(ynh_app_setting_get --app=$app --key=final_path) - -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_user=$db_name -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) - port=$(ynh_app_setting_get --app=$app --key=port) #================================================= @@ -107,12 +101,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index db08404..5d65061 100755 --- a/scripts/install +++ b/scripts/install @@ -81,7 +81,6 @@ ynh_app_setting_set --app=$app --key=port --value=$port ynh_script_progression --message="Installing dependencies..." --weight=6 ynh_install_app_dependencies $pkg_dependencies - ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= @@ -110,13 +109,6 @@ ynh_script_progression --message="Setting up source files..." --weight=100 ynh_app_setting_set --app=$app --key=final_path --value=$final_path -# Download, check integrity, uncompress and patch the source from app.src -#ynh_setup_source --dest_dir="$final_path" - -chmod 750 "$final_path" -chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - #================================================= # NGINX CONFIGURATION #================================================= @@ -139,6 +131,10 @@ pushd $final_path ynh_exec_as $app "$ynh_node_load_PATH" $ynh_npm install --prefix "$final_path" -g facilmap-server@"$facilmap_version" popd +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # SETUP SYSTEMD #=================================================