Browse Source

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

[server-ce] add web-api service

GitOrigin-RevId: c0f33573e85c0fb4031df39c500cc2a110e07687
Jakob Ackermann 2 years ago
parent
commit
5a8857be97

+ 1 - 0
docker-compose.debug.yml

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

+ 1 - 1
server-ce/nginx/sharelatex.conf

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

+ 13 - 0
server-ce/runit/web-api-sharelatex/run

@@ -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

+ 4 - 1
server-ce/runit/web-sharelatex/run

@@ -3,7 +3,10 @@
 NODE_PARAMS=""
 if [ "$DEBUG_NODE" == "true" ]; then
     echo "running debug - web"
-    NODE_PARAMS="--inspect=0.0.0.0:30000"
+    NODE_PARAMS="--inspect=0.0.0.0:40000"
 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