🔧 Troubleshooting socket.io in docker-compose part 2

This commit is contained in:
2021-10-31 09:41:41 -07:00
parent 8fc8bf7248
commit a18705dab8
2 changed files with 84 additions and 91 deletions

View File

@@ -12,7 +12,6 @@ services:
restart: unless-stopped restart: unless-stopped
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.threetwo-ui.rule=Host(`localhost`)" - "traefik.http.routers.threetwo-ui.rule=Host(`localhost`)"
- "traefik.http.services.threetwo-ui.loadbalancer.server.port=8050" - "traefik.http.services.threetwo-ui.loadbalancer.server.port=8050"
- "traefik.docker.network=proxy" - "traefik.docker.network=proxy"
@@ -20,54 +19,52 @@ services:
- "8050:8050" - "8050:8050"
- "3050:3050" - "3050:3050"
links: links:
# - import
- importapi - importapi
# - libraryqueue
depends_on: depends_on:
- db - db
- redis - redis
- nats - nats
- traefik - traefik
- importapi - importapi
# - import - import
# - imagetransformation - imagetransformation
networks: networks:
- proxy - proxy
# comicvineapi: comicvineapi:
# build: build:
# context: https://github.com/rishighan/comicvine-service.git context: https://github.com/rishighan/comicvine-service.git
# image: frishi/comicvine-service image: frishi/comicvine-service
# container_name: comicvine-api container_name: comicvine-api
# ports: ports:
# - "3080:3080" - "3080:3080"
# environment: environment:
# SERVICES: api SERVICES: api
# labels: labels:
# - "traefik.enable=true" - "traefik.enable=true"
# - "traefik.http.routers.comicvine-service.rule=Host(`localhost`)" - "traefik.http.routers.comicvine-service.rule=Host(`localhost`)"
# - "traefik.http.services.comicvine-service.loadbalancer.server.port=3080" - "traefik.http.services.comicvine-service.loadbalancer.server.port=3080"
# - "traefik.docker.network=proxy" - "traefik.docker.network=proxy"
# env_file: ./docker-env/comicvine-service.env env_file: ./docker-env/comicvine-service.env
# volumes: volumes:
# - ./userdata:/comicvine-service/userdata - ./userdata:/comicvine-service/userdata
# depends_on: depends_on:
# - nats - nats
# networks: networks:
# - proxy - proxy
# comicvine: comicvine:
# build: build:
# context: https://github.com/rishighan/comicvine-service.git context: https://github.com/rishighan/comicvine-service.git
# image: frishi/comicvine-service image: frishi/comicvine-service
# container_name: comicvine-service container_name: comicvine-service
# environment: environment:
# SERVICES: comicvine SERVICES: comicvine
# volumes: volumes:
# - ./userdata:/comicvine-service/userdata - ./userdata:/comicvine-service/userdata
# env_file: ./docker-env/comicvine-service.env env_file: ./docker-env/comicvine-service.env
# networks: networks:
# - proxy - proxy
importapi: importapi:
build: build:
@@ -77,8 +74,6 @@ services:
ports: ports:
- "3000:3000" - "3000:3000"
- "3001:3001" - "3001:3001"
expose:
- "3001"
environment: environment:
SERVICES: api SERVICES: api
labels: labels:
@@ -97,58 +92,56 @@ services:
networks: networks:
- proxy - proxy
# import: import:
# build: build:
# context: https://github.com/rishighan/threetwo-import-service.git context: https://github.com/rishighan/threetwo-import-service.git
# image: frishi/threetwo-import-service image: frishi/threetwo-import-service
# container_name: import container_name: import
# ports: depends_on:
# - "3001:3001" - db
# depends_on: - nats
# - db environment:
# - nats SERVICES: import
# environment: volumes:
# SERVICES: import - ./userdata:/threetwo-import-service/userdata
# volumes: - ./comics:/threetwo-import-service/comics
# - ./userdata:/threetwo-import-service/userdata env_file: ./docker-env/threetwo-import-service.env
# - ./comics:/threetwo-import-service/comics networks:
# env_file: ./docker-env/threetwo-import-service.env - proxy
# networks:
# - proxy
# imagetransformation: imagetransformation:
# build: build:
# context: https://github.com/rishighan/threetwo-import-service.git context: https://github.com/rishighan/threetwo-import-service.git
# image: frishi/threetwo-import-service image: frishi/threetwo-import-service
# container_name: image-transformation container_name: image-transformation
# volumes: volumes:
# - ./userdata:/threetwo-import-service/userdata - ./userdata:/threetwo-import-service/userdata
# - ./comics:/threetwo-import-service/comics - ./comics:/threetwo-import-service/comics
# depends_on: depends_on:
# - db - db
# - nats - nats
# environment: environment:
# SERVICES: imagetransformation SERVICES: imagetransformation
# env_file: ./docker-env/threetwo-import-service.env env_file: ./docker-env/threetwo-import-service.env
# networks: networks:
# - proxy - proxy
# libraryqueue: libraryqueue:
# build: build:
# context: https://github.com/rishighan/threetwo-import-service.git context: https://github.com/rishighan/threetwo-import-service.git
# image: frishi/threetwo-import-service image: frishi/threetwo-import-service
# container_name: library-queue container_name: library-queue
# volumes: volumes:
# - ./userdata:/threetwo-import-service/userdata - ./userdata:/threetwo-import-service/userdata
# - ./comics:/threetwo-import-service/comics - ./comics:/threetwo-import-service/comics
# depends_on: depends_on:
# - db - db
# - nats - nats
# environment: environment:
# SERVICES: libraryqueue SERVICES: libraryqueue
# env_file: ./docker-env/threetwo-import-service.env env_file: ./docker-env/threetwo-import-service.env
# networks: networks:
# - proxy - proxy
db: db:
image: 'bitnami/mongodb:latest' image: 'bitnami/mongodb:latest'

View File

@@ -6,7 +6,7 @@ import createRootReducer from "../reducers";
import socketIO from "socket.io-client"; import socketIO from "socket.io-client";
import socketIoMiddleware from "redux-socket.io-middleware"; import socketIoMiddleware from "redux-socket.io-middleware";
// import { SOCKET_BASE_URI } from "../constants/endpoints"; // import { SOCKET_BASE_URI } from "../constants/endpoints";
const io = socketIO(`ws://importapi:3001`); const io = socketIO(`http://localhost:3001`);
export const history = createBrowserHistory(); export const history = createBrowserHistory();
const configureStore = (initialState) => { const configureStore = (initialState) => {
const store = createStore( const store = createStore(