mirror of
https://github.com/YunoHost-Apps/nocodb_ynh.git
synced 2024-09-03 19:56:01 +02:00
commit
8cb8ee93ac
8 changed files with 57 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue