Merge pull request #14857 from overleaf/jpa-server-pro-web-api

[server-ce] add web-api service

GitOrigin-RevId: c0f33573e85c0fb4031df39c500cc2a110e07687
This commit is contained in:
Jakob Ackermann 2023-09-18 13:53:08 +02:00 committed by Copybot
parent 31cb9e336b
commit 5a8857be97
4 changed files with 19 additions and 2 deletions

View file

@ -14,6 +14,7 @@ services:
- 30100:30100 - 30100:30100
- 30540:30540 - 30540:30540
- 30640:30640 - 30640:30640
- 40000:40000
# Server Pro # Server Pro
- 30070:30070 - 30070:30070

View file

@ -10,7 +10,7 @@ server {
} }
location / { location / {
proxy_pass http://127.0.0.1:3000; proxy_pass http://127.0.0.1:4000;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";

View file

@ -0,0 +1,13 @@
#!/bin/bash
NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - web-api"
NODE_PARAMS="--inspect=0.0.0.0:30000"
fi
export LISTEN_ADDRESS=0.0.0.0
export ENABLED_SERVICES="api"
export METRICS_APP_NAME="web-api"
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /overleaf/services/web/app.js >> /var/log/sharelatex/web-api.log 2>&1

View file

@ -3,7 +3,10 @@
NODE_PARAMS="" NODE_PARAMS=""
if [ "$DEBUG_NODE" == "true" ]; then if [ "$DEBUG_NODE" == "true" ]; then
echo "running debug - web" echo "running debug - web"
NODE_PARAMS="--inspect=0.0.0.0:30000" NODE_PARAMS="--inspect=0.0.0.0:40000"
fi fi
export ENABLED_SERVICES="web"
export WEB_PORT="4000"
exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /overleaf/services/web/app.js >> /var/log/sharelatex/web.log 2>&1 exec /sbin/setuser www-data /usr/bin/node $NODE_PARAMS /overleaf/services/web/app.js >> /var/log/sharelatex/web.log 2>&1