From 4c9b56c94e75c75fe573125d724554873343ce6a Mon Sep 17 00:00:00 2001 From: Thomas <51749973+Thovi98@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:11:54 +0200 Subject: [PATCH] update to latest version --- conf/nginx.conf | 69 ++++++++++++++------------ conf/overleaf-chat.service | 1 + conf/overleaf-clsi.service | 1 + conf/overleaf-contacts.service | 1 + conf/overleaf-docstore.service | 1 + conf/overleaf-document-updater.service | 1 + conf/overleaf-filestore.service | 1 + conf/overleaf-history-v1.service | 1 + conf/overleaf-notifications.service | 1 + conf/overleaf-project-history.service | 1 + conf/overleaf-real-time.service | 1 + conf/overleaf-spelling.service | 1 + conf/overleaf-web.service | 3 ++ conf/settings.js | 8 +-- manifest.toml | 4 +- scripts/_common.sh | 2 +- 16 files changed, 58 insertions(+), 39 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2d9041b..8bfc407 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,51 +1,56 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; -location __PATH__/ { + # block external access to prometheus /metrics + location /metrics/ { + internal; + } + + location __PATH__/ { # Set max upload size client_max_body_size 50m; - proxy_pass http://localhost:__PORT__; # The port must match the value of SHARELATEX_PORT. - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_send_timeout 10m; + proxy_pass http://127.0.0.1:__PORT__; # The port must match the value of SHARELATEX_PORT. + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 10m; + proxy_send_timeout 10m; # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} + } -location __PATH__/socket.io/ { - proxy_pass http://localhost:3026; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-Host $host; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_read_timeout 10m; - proxy_send_timeout 10m; -} + location __PATH__/socket.io/ { + proxy_pass http://127.0.0.1:3026; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_read_timeout 10m; + proxy_send_timeout 10m; + } location __PATH__/stylesheets/ { # Set max upload size client_max_body_size 50m; - alias __INSTALL_DIR__/live/services/web/public/stylesheets/; - expires 1y; -} + expires 1y; + } location __PATH__/minjs/ { - alias __INSTALL_DIR__/live/services/web/public/minjs/; - expires 1y; -} + + expires 1y; + } location __PATH__/img/ { - alias __INSTALL_DIR__/live/services/web/public/img/; - expires 1y; -} + + expires 1y; + } \ No newline at end of file diff --git a/conf/overleaf-chat.service b/conf/overleaf-chat.service index 3cd42ad..04881d4 100644 --- a/conf/overleaf-chat.service +++ b/conf/overleaf-chat.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/chat/app.js StandardOutput=append:/var/log/__APP__/chat.log StandardError=inherit diff --git a/conf/overleaf-clsi.service b/conf/overleaf-clsi.service index 41832a0..02f1c5b 100644 --- a/conf/overleaf-clsi.service +++ b/conf/overleaf-clsi.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/clsi/app.js StandardOutput=append:/var/log/__APP__/clsi.log StandardError=inherit diff --git a/conf/overleaf-contacts.service b/conf/overleaf-contacts.service index 5c4c01e..9fb405e 100644 --- a/conf/overleaf-contacts.service +++ b/conf/overleaf-contacts.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/contacts/app.js StandardOutput=append:/var/log/__APP__/contacts.log StandardError=inherit diff --git a/conf/overleaf-docstore.service b/conf/overleaf-docstore.service index 2142f94..5f4c4f1 100644 --- a/conf/overleaf-docstore.service +++ b/conf/overleaf-docstore.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/docstore/app.js StandardOutput=append:/var/log/__APP__/docstore.log StandardError=inherit diff --git a/conf/overleaf-document-updater.service b/conf/overleaf-document-updater.service index a1f1c40..4da29fb 100644 --- a/conf/overleaf-document-updater.service +++ b/conf/overleaf-document-updater.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/document-updater/app.js StandardOutput=append:/var/log/__APP__/document-updater.log StandardError=inherit diff --git a/conf/overleaf-filestore.service b/conf/overleaf-filestore.service index 10e3417..fc1cf80 100644 --- a/conf/overleaf-filestore.service +++ b/conf/overleaf-filestore.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/filestore/app.js StandardOutput=append:/var/log/__APP__/filestore.log StandardError=inherit diff --git a/conf/overleaf-history-v1.service b/conf/overleaf-history-v1.service index bf6e15d..7ae6fe1 100644 --- a/conf/overleaf-history-v1.service +++ b/conf/overleaf-history-v1.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" Environment="MONGO_CONNECTION_STRING=mongodb://127.0.0.1:27017/__DB_NAME__" Environment="NODE_CONFIG_DIR=__INSTALL_DIR__/live/services/history-v1/config" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/history-v1/app.js diff --git a/conf/overleaf-notifications.service b/conf/overleaf-notifications.service index 5699f45..f0bfade 100644 --- a/conf/overleaf-notifications.service +++ b/conf/overleaf-notifications.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/notifications/app.js StandardOutput=append:/var/log/__APP__/notifications.log StandardError=inherit diff --git a/conf/overleaf-project-history.service b/conf/overleaf-project-history.service index 4bc10a4..5fecd35 100644 --- a/conf/overleaf-project-history.service +++ b/conf/overleaf-project-history.service @@ -8,6 +8,7 @@ User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ EnvironmentFile=__INSTALL_DIR__/variables.env +Environment="LISTEN_ADDRESS=127.0.0.1" ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/project-history/app.js StandardOutput=append:/var/log/__APP__/project-history.log StandardError=inherit diff --git a/conf/overleaf-real-time.service b/conf/overleaf-real-time.service index 9f7981c..de857ae 100644 --- a/conf/overleaf-real-time.service +++ b/conf/overleaf-real-time.service @@ -7,6 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ +Environment="LISTEN_ADDRESS=127.0.0.1" EnvironmentFile=__INSTALL_DIR__/variables.env ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/real-time/app.js StandardOutput=append:/var/log/__APP__/real-time.log diff --git a/conf/overleaf-spelling.service b/conf/overleaf-spelling.service index efb3a0c..44c543c 100644 --- a/conf/overleaf-spelling.service +++ b/conf/overleaf-spelling.service @@ -7,6 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ +Environment="LISTEN_ADDRESS=127.0.0.1" EnvironmentFile=__INSTALL_DIR__/variables.env ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/spelling/app.js StandardOutput=append:/var/log/__APP__/spelling.log diff --git a/conf/overleaf-web.service b/conf/overleaf-web.service index 30f40bf..b6457f1 100644 --- a/conf/overleaf-web.service +++ b/conf/overleaf-web.service @@ -7,6 +7,9 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ +Environment="LISTEN_ADDRESS=127.0.0.1" +Environment="ENABLED_SERVICES="web"" +Environment="WEB_PORT="__PORT__"" EnvironmentFile=__INSTALL_DIR__/variables.env ExecStart=__YNH_NODE__ __INSTALL_DIR__/live/services/web/app.js StandardOutput=append:/var/log/__APP__/web.log diff --git a/conf/settings.js b/conf/settings.js index 39b3d84..f6725bb 100644 --- a/conf/settings.js +++ b/conf/settings.js @@ -258,16 +258,16 @@ const settings = { apis: { web: { - url: 'http://localhost:__PORT__', + url: 'http://127.0.0.1:__PORT__', user: httpAuthUser, pass: httpAuthPass, }, project_history: { sendProjectStructureOps: true, - url: 'http://localhost:3054', + url: 'http://127.0.0.1:3054', }, v1_history: { - url: process.env.V1_HISTORY_URL || 'http://localhost:3100/api', + url: process.env.V1_HISTORY_URL || 'http://127.0.0.1:3100/api', user: 'staging', pass: process.env.STAGING_PASSWORD, requestTimeout: parseInt( @@ -411,7 +411,7 @@ if ( if (parse(process.env.OVERLEAF_IS_SERVER_PRO) === true) { settings.bypassPercentageRollouts = true - settings.apis.references = { url: 'http://localhost:3040' } + settings.apis.references = { url: 'http://127.0.0.1:3040' } } // Compiler diff --git a/manifest.toml b/manifest.toml index 8ac7900..47be6c1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -51,8 +51,8 @@ ram.runtime = "3G" [resources] [resources.sources] [resources.sources.main] - url = "https://github.com/overleaf/overleaf/archive/af037ddb439505e1171f51d1a3e676a67fe98c9d.tar.gz" - sha256 = "403e9572b32addb4252de171191200510af70cdb868e90838091183e3ebec9a7" + url = "https://github.com/overleaf/overleaf/archive/2469c93da470c16649c17d39dae5bbc81185ebaa.tar.gz" + sha256 = "c0420f8815998945cae21b6e8b1c2bf9e9b0f5db171e41ee5225ae67fc75ca8e" autoupdate.strategy = "latest_github_commit" [resources.system_user] diff --git a/scripts/_common.sh b/scripts/_common.sh index d355291..890562e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -nodejs_version=18.20.1 +nodejs_version=18.20.2 #================================================= # PERSONAL HELPERS