diff --git a/conf/env b/conf/env index da59178..715fec6 100644 --- a/conf/env +++ b/conf/env @@ -5,3 +5,11 @@ NC_AUTH_JWT_SECRET=__JWT_SECRET__ NC_DISABLE_TELE=1 NC_PUBLIC_URL=https://__DOMAIN__ NC_REQUEST_BODY_SIZE=104857600 + +NC_SMTP_FROM=__APP__@__DOMAIN__ +NC_SMTP_HOST=localhost +NC_SMTP_PORT=25 +NC_SMTP_USERNAME=__APP__ +NC_SMTP_PASSWORD=__MAIL_PWD__ +NC_SMTP_SECURE=false +NC_SMTP_IGNORE_TLS diff --git a/conf/systemd.service b/conf/systemd.service index b3b2796..ed56183 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -10,8 +10,6 @@ WorkingDirectory=__INSTALL_DIR__/ Environment="__YNH_NODE_LOAD_PATH__" EnvironmentFile=__INSTALL_DIR__/.env ExecStart=__YNH_NODE__ __INSTALL_DIR__/nocodb -StandardOutput=append:/var/log/__APP__/__APP__.log -StandardError=inherit # Sandboxing options to harden security # Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html diff --git a/manifest.toml b/manifest.toml index 355d2a9..50f8e78 100644 --- a/manifest.toml +++ b/manifest.toml @@ -49,7 +49,8 @@ ram.runtime = "50M" extract = false [resources.system_user] - + allow_email = true + [resources.install_dir] [resources.ports] diff --git a/scripts/change_url b/scripts/change_url index b4084a8..49d5387 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -33,7 +33,7 @@ ynh_change_url_nginx_config ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="application successfully started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="application successfully started" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index e0187b3..ce30091 100755 --- a/scripts/install +++ b/scripts/install @@ -57,25 +57,6 @@ ynh_use_logrotate yunohost service add $app --description="Turns any database into a smart-spreadsheet" --log="/var/log/$app/$app.log" -#================================================= -# SPECIFIC SETUP -#================================================= -# INSTALL NOCODB -#================================================= -ynh_script_progression --message="Installing NocoDB..." --weight=5 - -ynh_use_nodejs -pushd $install_dir - if [ $YNH_ARCH = "arm64" ]; then - ynh_print_info --message="Retrieving and building OracleDB for ARM64..." - ynh_exec_warn_less ynh_exec_as $app git clone --recursive https://github.com/oracle/node-oracledb.git oracledb - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV="production" $ynh_npm install ./oracledb - ynh_print_info --message="...Done! Installing NocoDB now..." - fi - - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV="production" $ynh_npm install --save nocodb@$(ynh_app_upstream_version) -popd - #================================================= # ADD A CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index f6adbd1..7df28be 100755 --- a/scripts/restore +++ b/scripts/restore @@ -60,7 +60,7 @@ yunohost service add $app --description="Turns any database into a smart-spreads #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="application successfully started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="application successfully started" ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index b1060f3..92eada0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -63,33 +63,12 @@ ynh_use_logrotate --non-append yunohost service add $app --description="Turns any database into a smart-spreadsheet" --log="/var/log/$app/$app.log" -#================================================= -# SPECIFIC UPGRADE -#================================================= -# PERFORMING NOCODB UPGRADE -#================================================= -ynh_script_progression --message="Upgrading NocoDB..." --weight=5 - -ynh_use_nodejs -pushd $install_dir - - if [ $YNH_ARCH = "arm64" ]; then - ynh_print_info --message="Retrieving and building OracleDB for ARM64..." - ynh_secure_remove oracledb - ynh_exec_warn_less ynh_exec_as $app git clone --recursive https://github.com/oracle/node-oracledb.git oracledb - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV="production" $ynh_npm install ./oracledb - fi - - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV="production" $ynh_npm uninstall nocodb - ynh_exec_warn_less ynh_exec_as $app $ynh_node_load_PATH NODE_ENV="production" $ynh_npm install --save nocodb@$(ynh_app_upstream_version) -popd - #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" --line_match="application successfully started" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="application successfully started" #================================================= # END OF SCRIPT