diff --git a/admin/server.js b/admin/server.js index f595492..cf7e1fb 100644 --- a/admin/server.js +++ b/admin/server.js @@ -27,7 +27,7 @@ app.get('/health', (req, res) => { // API endpoint to get environment config for client app.get('/api/config', (req, res) => { res.json({ - serverUrl: process.env.SERVER_URL, + serverUrl: process.env.PUBLIC_SERVER_URL || process.env.SERVER_URL, environment: ENV }); }); diff --git a/client/server.js b/client/server.js index a0d3a68..5d2cb08 100644 --- a/client/server.js +++ b/client/server.js @@ -51,7 +51,7 @@ app.get('/health', (req, res) => { // API endpoint to get environment config for client app.get('/api/config', (req, res) => { res.json({ - serverUrl: process.env.SERVER_URL, + serverUrl: process.env.PUBLIC_SERVER_URL || process.env.SERVER_URL, environment: ENV }); }); diff --git a/docker-compose.yml b/docker-compose.yml index 4115fca..1122a9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,8 @@ services: environment: - NODE_ENV=production - PORT=3000 - - SERVER_URL=https://snatchGameServer.interno.com + - SERVER_URL=http://snatchgame-server:2567 + - PUBLIC_SERVER_URL=https://snatchGameServer.interno.com depends_on: - snatchgame-server networks: @@ -53,7 +54,8 @@ services: environment: - NODE_ENV=production - PORT=3001 - - SERVER_URL=https://snatchGameServer.interno.com + - SERVER_URL=http://snatchgame-server:2567 + - PUBLIC_SERVER_URL=https://snatchGameServer.interno.com depends_on: - snatchgame-server networks: