From 0761fead3194751b1bf01b2622c118785a10f4c0 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sun, 2 Jun 2024 11:36:13 +0000 Subject: [PATCH 1/9] Auto-update READMEs --- ALL_README.md | 2 +- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README.md b/README.md index 99ba42d..aced0a8 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Be aware, Redis database backup and restore is not fully implemented. If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**Shipped version:** 2.0.3~ynh1 +**Shipped version:** 2.1.0~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index 39955f8..d101b2e 100644 --- a/README_es.md +++ b/README_es.md @@ -22,7 +22,7 @@ Be aware, Redis database backup and restore is not fully implemented. If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**Versión actual:** 2.0.3~ynh1 +**Versión actual:** 2.1.0~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index 812b63f..3b188d8 100644 --- a/README_eu.md +++ b/README_eu.md @@ -22,7 +22,7 @@ Be aware, Redis database backup and restore is not fully implemented. If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**Paketatutako bertsioa:** 2.0.3~ynh1 +**Paketatutako bertsioa:** 2.1.0~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 00285ae..b7c03eb 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,7 +22,7 @@ Attention, la sauvegarde et la restauration de la base de données Redis ne sont Si vous souhaitez installer Etherpad avec les plugins et la base de données mysql : https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**Version incluse :** 2.0.3~ynh1 +**Version incluse :** 2.1.0~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 442625d..5a42d01 100644 --- a/README_gl.md +++ b/README_gl.md @@ -22,7 +22,7 @@ Be aware, Redis database backup and restore is not fully implemented. If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**Versión proporcionada:** 2.0.3~ynh1 +**Versión proporcionada:** 2.1.0~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index c38ac7c..607540e 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -22,7 +22,7 @@ Be aware, Redis database backup and restore is not fully implemented. If you want to install Etherpad with plugins and mysql database: https://github.com/YunoHost-Apps/etherpad_mypads_ynh", -**分发版本:** 2.0.3~ynh1 +**分发版本:** 2.1.0~ynh1 **演示:** From 58a7d817cb3ef5f6b9d823cbbf219e1b43a6b9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 2 Jun 2024 13:36:14 +0200 Subject: [PATCH 2/9] Update nginx.conf --- conf/nginx.conf | 83 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 63 insertions(+), 20 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8ae2f3e..c5cac2a 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,26 +1,69 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + rewrite __PATH__/(.*) /$1 break; + rewrite ^__PATH__$ __PATH__/ permanent; + proxy_redirect / __PATH__/; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_set_header Host $host; - proxy_pass_header Server; + proxy_pass http://127.0.0.1:__PORT__/; + proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_set_header Host $host; + proxy_pass_header Server; - proxy_buffering off; - more_set_headers "X-Frame-Options : ALLOWALL"; - proxy_set_header X-Real-IP $remote_addr; # http://wiki.nginx.org/HttpProxyModule - proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP - proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used - proxy_set_header Host $host; # pass the host header - proxy_http_version 1.1; # recommended with keepalive connections - - # WebSocket proxying - from http://nginx.org/en/docs/http/websocket.html - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; + # Note you might want to pass more headers etc too. See above configs. + } - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; -} + location __PATH__/socket.io { + rewrite __PATH__/socket.io/(.*) /socket.io/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { - return 404; -} + proxy_pass http://127.0.0.1:__PORT__/; + proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_set_header Host $host; + proxy_pass_header Server; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + # Note you might want to pass more headers etc too. See above configs. + } + + + + location __PATH__/admin { + rewrite __PATH__/admin/(.*) __PATH__/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Proxy-Path __PATH__; + proxy_pass http://127.0.0.1:__PORT__/; + + proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_set_header Host $host; + proxy_pass_header Server; + + # Note you might want to pass more headers etc too. See above configs. + } + + + location __PATH__/admin-auth { + rewrite __PATH__/admin-auth/(.*) /admin-auth/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Proxy-Path __PATH__; + proxy_pass http://127.0.0.1:__PORT__/; + + proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_set_header Host $host; + proxy_pass_header Server; + + # Note you might want to pass more headers etc too. See above configs. + } + + location __PATH__/static { + rewrite __PATH__/static/(.*) /static/$1 break; + + proxy_pass http://127.0.0.1:__PORT__/; + proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_set_header Host $host; + proxy_pass_header Server; + + # Note you might want to pass more headers etc too. See above configs. + } From 078ca48cdfca934c09c09e8c16e0a9f93c99cca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 2 Jun 2024 14:26:54 +0200 Subject: [PATCH 3/9] Update nginx.conf --- conf/nginx.conf | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index c5cac2a..0e4a014 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,7 +5,7 @@ location __PATH__/ { proxy_redirect / __PATH__/; proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -16,9 +16,8 @@ location __PATH__/ { rewrite __PATH__/socket.io/(.*) /socket.io/$1 break; proxy_redirect / __PATH__/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; proxy_http_version 1.1; @@ -33,10 +32,9 @@ location __PATH__/ { location __PATH__/admin { rewrite __PATH__/admin/(.*) __PATH__/$1 break; proxy_redirect / __PATH__/; - proxy_set_header X-Proxy-Path __PATH__; + proxy_set_header X-Proxy-Path __PATH__; proxy_pass http://127.0.0.1:__PORT__/; - - proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -49,8 +47,7 @@ location __PATH__/ { proxy_redirect / __PATH__/; proxy_set_header X-Proxy-Path __PATH__; proxy_pass http://127.0.0.1:__PORT__/; - - proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -59,9 +56,8 @@ location __PATH__/ { location __PATH__/static { rewrite __PATH__/static/(.*) /static/$1 break; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; # be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf + proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; From 469d446c63696dffe2c38a101afa69e40baf867b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:05:10 +0200 Subject: [PATCH 4/9] Update install --- scripts/install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 62ec041..23d8d2f 100644 --- a/scripts/install +++ b/scripts/install @@ -80,8 +80,7 @@ ynh_script_progression --message="Installing $app..." --weight=10 pushd $install_dir ynh_use_nodejs - ynh_exec_warn_less env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less env $ynh_node_load_PATH corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/installDeps.sh popd From c24963682db265c9452745253ff03021d89e3e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:05:27 +0200 Subject: [PATCH 5/9] Update upgrade --- scripts/upgrade | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0335593..ec9e664 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -101,8 +101,7 @@ ynh_script_progression --message="Installing $app..." --weight=10 pushd $install_dir ynh_use_nodejs - ynh_exec_warn_less env $ynh_node_load_PATH corepack enable - ynh_exec_warn_less env $ynh_node_load_PATH corepack prepare pnpm@latest --activate + ynh_exec_warn_less env $ynh_node_load_PATH corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@latest --activate ynh_exec_warn_less ynh_exec_as $app env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/installDeps.sh popd From 49a1f915aeb781a24c1f1619a32a05ec921a3da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:21:07 +0200 Subject: [PATCH 6/9] Update nginx.conf --- conf/nginx.conf | 87 ++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 0e4a014..6004622 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,7 +4,7 @@ location __PATH__/ { rewrite ^__PATH__$ __PATH__/ permanent; proxy_redirect / __PATH__/; - proxy_pass http://127.0.0.1:__PORT__/; + proxy_pass http://127.0.0.1:__PORT__; proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -12,54 +12,51 @@ location __PATH__/ { # Note you might want to pass more headers etc too. See above configs. } - location __PATH__/socket.io { - rewrite __PATH__/socket.io/(.*) /socket.io/$1 break; - proxy_redirect / __PATH__/; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; - proxy_set_header Host $host; - proxy_pass_header Server; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; +location __PATH__/socket.io { + rewrite __PATH__/socket.io/(.*) /socket.io/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://127.0.0.1:__PORT__; + proxy_buffering off; + proxy_set_header Host $host; + proxy_pass_header Server; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; - # Note you might want to pass more headers etc too. See above configs. - } + # Note you might want to pass more headers etc too. See above configs. +} +location __PATH__/admin { + rewrite __PATH__/admin/(.*) __PATH__/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Proxy-Path __PATH__; + proxy_pass http://127.0.0.1:__PORT__; + proxy_buffering off; + proxy_set_header Host $host; + proxy_pass_header Server; + # Note you might want to pass more headers etc too. See above configs. +} - location __PATH__/admin { - rewrite __PATH__/admin/(.*) __PATH__/$1 break; - proxy_redirect / __PATH__/; - proxy_set_header X-Proxy-Path __PATH__; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; - proxy_set_header Host $host; - proxy_pass_header Server; +location __PATH__/admin-auth { + rewrite __PATH__/admin-auth/(.*) /admin-auth/$1 break; + proxy_redirect / __PATH__/; + proxy_set_header X-Proxy-Path __PATH__; + proxy_pass http://127.0.0.1:__PORT__; + proxy_buffering off; + proxy_set_header Host $host; + proxy_pass_header Server; - # Note you might want to pass more headers etc too. See above configs. - } + # Note you might want to pass more headers etc too. See above configs. +} +location __PATH__/static { + rewrite __PATH__/static/(.*) /static/$1 break; + proxy_pass http://127.0.0.1:__PORT__/; + proxy_buffering off; + proxy_set_header Host $host; + proxy_pass_header Server; - location __PATH__/admin-auth { - rewrite __PATH__/admin-auth/(.*) /admin-auth/$1 break; - proxy_redirect / __PATH__/; - proxy_set_header X-Proxy-Path __PATH__; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; - proxy_set_header Host $host; - proxy_pass_header Server; - - # Note you might want to pass more headers etc too. See above configs. - } - - location __PATH__/static { - rewrite __PATH__/static/(.*) /static/$1 break; - proxy_pass http://127.0.0.1:__PORT__/; - proxy_buffering off; - proxy_set_header Host $host; - proxy_pass_header Server; - - # Note you might want to pass more headers etc too. See above configs. - } + # Note you might want to pass more headers etc too. See above configs. +} From 30186aa2418785b7876d8bc8f2f71c056263f8fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 6 Jun 2024 21:26:21 +0200 Subject: [PATCH 7/9] Update nginx.conf --- conf/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6004622..40a0336 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -28,7 +28,7 @@ location __PATH__/socket.io { } location __PATH__/admin { - rewrite __PATH__/admin/(.*) __PATH__/$1 break; + rewrite __PATH__/admin/(.*) /admin/$1 break; proxy_redirect / __PATH__/; proxy_set_header X-Proxy-Path __PATH__; proxy_pass http://127.0.0.1:__PORT__; From 38fc170df8c417d392bbacf7a4f4038c859d9bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Jun 2024 20:12:14 +0200 Subject: [PATCH 8/9] Update install --- scripts/install | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/install b/scripts/install index 81524ab..ed705e3 100644 --- a/scripts/install +++ b/scripts/install @@ -84,10 +84,6 @@ pushd $install_dir ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true pnpm --recursive i --production popd -#pushd $install_dir/admin -# ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true pnpm install && pnpm run build-copy -#popd - #================================================= # START SYSTEMD SERVICE #================================================= From 05e37cd598187e30492ec6c6822d19cc1412189d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 7 Jun 2024 22:00:18 +0200 Subject: [PATCH 9/9] fix --- conf/nginx.conf | 8 ++++---- conf/systemd.service | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 444a207..6b28fe4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,7 +4,7 @@ location __PATH__/ { rewrite ^__PATH__$ __PATH__/ permanent; proxy_redirect / __PATH__/; - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -16,7 +16,7 @@ location __PATH__/socket.io { proxy_redirect / __PATH__/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -31,7 +31,7 @@ location __PATH__/admin { proxy_redirect / __PATH__/; proxy_set_header X-Proxy-Path __PATH__; - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; @@ -49,7 +49,7 @@ location __PATH__/admin-auth { rewrite __PATH__/admin-auth/(.*) /admin-auth/$1 break; proxy_redirect / __PATH__/; proxy_set_header X-Proxy-Path __PATH__; - proxy_pass http://127.0.0.1:__PORT__; + proxy_pass http://127.0.0.1:__PORT__/; proxy_buffering off; proxy_set_header Host $host; proxy_pass_header Server; diff --git a/conf/systemd.service b/conf/systemd.service index a152a7b..cd96721 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,8 +9,9 @@ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ Environment="NODE_ENV=production" Environment="__YNH_NODE_LOAD_PATH__" -#ExecStart=__INSTALL_DIR__/bin/run.sh -ExecStart=pnpm run prod +Environment="ETHERPAD_PRODUCTION=true" +ExecStart=__INSTALL_DIR__/bin/run.sh +#ExecStart=pnpm run prod Restart=always # Sandboxing options to harden security