diff --git a/README.md b/README.md index e725e74..0f80849 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Shipped version:** 0.83.8~ynh1 +**Shipped version:** 0.84.1~ynh3 **Demo:** https://www.nocodb.com/demos diff --git a/README_fr.md b/README_fr.md index fa421a1..298a4c3 100644 --- a/README_fr.md +++ b/README_fr.md @@ -23,7 +23,7 @@ NocoDB is an open source NoCode platform that turns any database into a smart sp *(from NocoDB's website)* -**Version incluse :** 0.83.8~ynh1 +**Version incluse :** 0.84.1~ynh3 **Démo :** https://www.nocodb.com/demos diff --git a/conf/app.src b/conf/app.src index 0db9987..4f9855b 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/nocodb/nocodb-seed/archive/e542be1003237e8da2df5c1e7893c1c8631a9cbc.zip -SOURCE_SUM=ea9ec5aa9029344590c0aa5b80f9157080d12b17de0e5da50ab5482797401417 +SOURCE_URL=https://github.com/nocodb/nocodb-seed/archive/b9ee3ac8cc01e92bdfebac6d7c957c566503a3d0.zip +SOURCE_SUM=83fea0d69c3afae36c69bc59af197dea42a3e612653d1d25c9da4d30946daf31 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_EXTRACT=true diff --git a/conf/nginx.conf b/conf/nginx.conf index d15c029..6ce91ce 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,11 +1,6 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_pass http://127.0.0.1:__PORT____PATH__; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/conf/systemd.service b/conf/systemd.service index d2d7118..d0a49ce 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -13,5 +13,33 @@ ExecStart=__YNH_NODE__ index.js 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 +NoNewPrivileges=yes +PrivateTmp=yes +PrivateDevices=yes +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK +RestrictNamespaces=yes +RestrictRealtime=yes +DevicePolicy=closed +ProtectSystem=full +ProtectControlGroups=yes +ProtectKernelModules=yes +ProtectKernelTunables=yes +LockPersonality=yes +SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap + +# Denying access to capabilities that should not be relevant for webapps +# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html +CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD +CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE +CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT +CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK +CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM +CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG +CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE +CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW +CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG + [Install] WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index 94423e1..8b01dd6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "No-code platform that turns any database into a smart spreadsheet", "fr": "Plateform sans code qui transforme toute base de données en un tableur intelligent." }, - "version": "0.83.8~ynh1", + "version": "0.84.1~ynh3", "url": "https://www.nocodb.com/", "upstream": { "license": "AGPL-3.0-only", @@ -20,7 +20,7 @@ "email": "tituspijean@outlook.com" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.3" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 5ad8cd1..ca88b78 100755 --- a/scripts/install +++ b/scripts/install @@ -31,6 +31,12 @@ app=$YNH_APP_INSTANCE_NAME #================================================= ynh_script_progression --message="Validating installation parameters..." --weight=1 +# Stop if architecture is 32-bit ARM +case $YNH_ARCH in + arm|armhf) ynh_die --message="Sorry, your architecture $YNH_ARCH is not supported by NocoDB. Aborting.";; + *) ;; +esac + final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" @@ -111,6 +117,14 @@ ynh_script_progression --message="Installing NocoDB..." --weight=5 ynh_use_nodejs pushd $final_path + + 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 $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 $ynh_npm install popd diff --git a/scripts/upgrade b/scripts/upgrade index 3551ab6..f11ea44 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -107,6 +107,15 @@ ynh_script_progression --message="Upgrading NocoDB..." --weight=5 ynh_use_nodejs pushd $final_path + + 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 $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 $ynh_npm install popd