From 59a64f2635e603b0a73b7568f4ebd58f45bab78a 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:36:09 +0200 Subject: [PATCH 1/9] Update settings.json --- conf/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/settings.json b/conf/settings.json index 0bf1424..f061278 100644 --- a/conf/settings.json +++ b/conf/settings.json @@ -265,7 +265,7 @@ * This will improve the loading performance massively, but makes it difficult * to debug the javascript/css */ - "minify": true, + "minify": false, /* * How long may clients use served javascript code (in seconds)? From 5500e1ce4265b71bc0b8073eb430f791680d853b 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 13:23:12 +0200 Subject: [PATCH 2/9] fix --- doc/ADMIN.md | 2 +- doc/ADMIN_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/ADMIN.md b/doc/ADMIN.md index f3d39fc..02204a0 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -1,3 +1,3 @@ -You can access Etherpad's admin panel at `__DOMAIN____PATH__admin`. The configuration file for Etherpad is at the path `__INSTALL_DIR__/settings.json`. +You can access Etherpad's admin panel at `__DOMAIN____PATH__/admin`. The configuration file for Etherpad is at the path `__INSTALL_DIR__/settings.json`. *Skin Builder* (accessible at this address `__DOMAIN____PATH__/pad/p/test#skinvariantsbuilder`) allows you to customize the skin of your pad. It will give you a parameter to copy into your configuration file `__INSTALL_DIR__/settings.json`. diff --git a/doc/ADMIN_fr.md b/doc/ADMIN_fr.md index d3a272e..d216b09 100644 --- a/doc/ADMIN_fr.md +++ b/doc/ADMIN_fr.md @@ -1,3 +1,3 @@ -Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `__DOMAIN____PATH__admin`. Le fichier de configuration d'Etherpad est `__INSTALL_DIR__/settings.json`. +Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `__DOMAIN____PATH__/admin`. Le fichier de configuration d'Etherpad est `__INSTALL_DIR__/settings.json`. *Skin Builder* (accessible à l'adresse `__INSTALL_DIR__/pad/p/test#skinvariantsbuilder`) vous permet de personnaliser l'apparence de votre pad. Il vous donnera un paramètre à copier dans votre fichier de configuration `__INSTALL_DIR__/settings.json`. From 03c6ef41bff1f19bd6f8bce90380d2121fb3a9e9 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 19:04:57 +0200 Subject: [PATCH 3/9] Update nginx.conf --- conf/nginx.conf | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 8ae2f3e..35bfc10 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,24 +1,18 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __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; - 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; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_http_version 1.1; - # Include SSOWAT user panel. - include conf.d/yunohost_panel.conf.inc; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } location ~* __PATH__/p/[^/]*(_|%|\*)[^/]*/export/etherpad { From 337e002173a8ffa9d01b8fc7a0adb413abab9514 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 19:17:26 +0200 Subject: [PATCH 4/9] Update install --- scripts/install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install b/scripts/install index 23d8d2f..fbb42f7 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,12 @@ pushd $install_dir ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/installDeps.sh popd +pushd $install_dir/admin + ynh_use_nodejs + + ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm build-copy +popd + #================================================= # START SYSTEMD SERVICE #================================================= From b905a0b9c5dab6af7b414ffc83c3978ec4169e30 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 19:22:57 +0200 Subject: [PATCH 5/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index fbb42f7..e0d7297 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ popd pushd $install_dir/admin ynh_use_nodejs - ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm build-copy + ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm run build-copy popd #================================================= From bede2fb27bf4440e3d10b65a073b3f22ce8edcf5 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 19:25:21 +0200 Subject: [PATCH 6/9] Update install --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e0d7297..af3e895 100644 --- a/scripts/install +++ b/scripts/install @@ -87,7 +87,7 @@ popd pushd $install_dir/admin ynh_use_nodejs - ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm run build-copy + ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install && pnpm run build-copy popd #================================================= From e5ca2de3bb7104ea06aad17073c9563d07e4359f 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 19:25:32 +0200 Subject: [PATCH 7/9] Update install --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index af3e895..28a04c0 100644 --- a/scripts/install +++ b/scripts/install @@ -85,8 +85,6 @@ pushd $install_dir popd pushd $install_dir/admin - ynh_use_nodejs - ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install && pnpm run build-copy popd From 9021f154db2a52c9d4b52715a3d552f9b09a29bb 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 19:41:18 +0200 Subject: [PATCH 8/9] Update install --- scripts/install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 28a04c0..42ba429 100644 --- a/scripts/install +++ b/scripts/install @@ -81,12 +81,13 @@ 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 && 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 + #ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 bin/installDeps.sh + 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 COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install && pnpm run build-copy -popd +#pushd $install_dir/admin +# ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install && pnpm run build-copy +#popd #================================================= # START SYSTEMD SERVICE From 816ce822c4432f4df2e729ccdd2668c6f511aa3b 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 19:47:53 +0200 Subject: [PATCH 9/9] fix --- conf/systemd.service | 5 ++--- scripts/install | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 559f1e1..a152a7b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,11 +7,10 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -Environment=ETHERPAD_PRODUCTION=true Environment="NODE_ENV=production" Environment="__YNH_NODE_LOAD_PATH__" -ExecStart=__INSTALL_DIR__/bin/run.sh -#ExecStart=pnpm run prod +#ExecStart=__INSTALL_DIR__/bin/run.sh +ExecStart=pnpm run prod Restart=always # Sandboxing options to harden security diff --git a/scripts/install b/scripts/install index 42ba429..81524ab 100644 --- a/scripts/install +++ b/scripts/install @@ -81,12 +81,11 @@ 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 && 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 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 COREPACK_ENABLE_DOWNLOAD_PROMPT=0 pnpm install && pnpm run build-copy +# ynh_exec_warn_less env $ynh_node_load_PATH ETHERPAD_PRODUCTION=true pnpm install && pnpm run build-copy #popd #=================================================