diff --git a/docker-compose.yml b/docker-compose.yml index 02e0976..694c7c1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,6 +8,8 @@ services: image: frishi/threetwo container_name: threetwo-ui env_file: ./docker-compose.env + environment: + DOCKERHOST: "{{.Node.Hostname}}" restart: unless-stopped labels: - "traefik.enable=true" diff --git a/src/client/constants/endpoints.ts b/src/client/constants/endpoints.ts index 6eda2eb..ba1d0d6 100644 --- a/src/client/constants/endpoints.ts +++ b/src/client/constants/endpoints.ts @@ -1,3 +1,4 @@ export const COMICBOOKINFO_SERVICE_URI = "http://localhost:3080/api/comicvine/"; export const API_BASE_URI = "http://localhost:8050/api/"; -export const SOCKET_BASE_URI = "http://ghost:8051/"; +export const SOCKET_BASE_URI = + process.env.DOCKERHOST + ":8051" || "ws://localhost:8051";