diff --git a/conf/nginx.conf b/conf/nginx.conf index 40a0336..444a207 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,13 +9,13 @@ location __PATH__/ { proxy_set_header Host $host; proxy_pass_header Server; - # 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; @@ -24,19 +24,25 @@ location __PATH__/socket.io { 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/(.*) /admin/$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. + 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; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; } location __PATH__/admin-auth { @@ -58,5 +64,4 @@ location __PATH__/static { proxy_set_header Host $host; proxy_pass_header Server; - # Note you might want to pass more headers etc too. See above configs. } 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)? 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/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`. diff --git a/scripts/install b/scripts/install index 23d8d2f..81524ab 100644 --- a/scripts/install +++ b/scripts/install @@ -81,9 +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 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 #=================================================