diff --git a/src/assets/docker-compose.yml b/src/assets/docker-compose.yml index 09e03fb..59e7989 100644 --- a/src/assets/docker-compose.yml +++ b/src/assets/docker-compose.yml @@ -38,28 +38,11 @@ services: networks: - tipi_main_network - runtipi-redis: - container_name: runtipi-redis - image: redis:7.2.0 - restart: unless-stopped - command: redis-server --requirepass ${REDIS_PASSWORD} --stop-writes-on-bgsave-error no - ports: - - 6379:6379 - volumes: - - ./data/redis:/data - healthcheck: - test: ["CMD", "redis-cli", "ping"] - interval: 5s - timeout: 10s - retries: 10 - networks: - - tipi_main_network - runtipi: container_name: runtipi healthcheck: - test: - ["CMD", "curl", "-f", "http://localhost:5000/worker-api/healthcheck"] + start_period: 10s + test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] interval: 5s timeout: 3s retries: 20 @@ -68,8 +51,6 @@ services: depends_on: runtipi-db: condition: service_healthy - runtipi-redis: - condition: service_healthy env_file: - .env volumes: @@ -125,51 +106,31 @@ services: traefik.http.routers.dashboard-local.tls: true traefik.http.routers.dashboard-local.service: dashboard - # ---- Worker ----- # - traefik.http.services.worker.loadbalancer.server.port: 5001 - traefik.http.services.worker-api.loadbalancer.server.port: 5000 + # ---- socket ----- # + traefik.http.services.socket.loadbalancer.server.port: 5001 # Local ip - traefik.http.routers.worker.rule: PathPrefix("/worker") - traefik.http.routers.worker.service: worker - traefik.http.routers.worker.entrypoints: web - traefik.http.routers.worker-api.rule: PathPrefix("/worker-api") - traefik.http.routers.worker-api.service: worker-api - traefik.http.routers.worker-api.entrypoints: web + traefik.http.routers.socket.rule: PathPrefix("/api/socket.io") + traefik.http.routers.socket.service: socket + traefik.http.routers.socket.entrypoints: web # Websecure - traefik.http.routers.worker-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker`) - traefik.http.routers.worker-insecure.service: worker - traefik.http.routers.worker-insecure.entrypoints: web - traefik.http.routers.worker-insecure.middlewares: redirect-to-https - traefik.http.routers.worker-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker`) - traefik.http.routers.worker-secure.service: worker - traefik.http.routers.worker-secure.entrypoints: websecure - traefik.http.routers.worker-secure.tls.certresolver: myresolver - traefik.http.routers.worker-api-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker-api`) - traefik.http.routers.worker-api-insecure.service: worker-api - traefik.http.routers.worker-api-insecure.entrypoints: web - traefik.http.routers.worker-api-insecure.middlewares: redirect-to-https - traefik.http.routers.worker-api-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/worker-api`) - traefik.http.routers.worker-api-secure.service: worker-api - traefik.http.routers.worker-api-secure.entrypoints: websecure - traefik.http.routers.worker-api-secure.tls.certresolver: myresolver + traefik.http.routers.socket-insecure.rule: Host(`${DOMAIN}`) && PathPrefix(`/api/socket.io`) + traefik.http.routers.socket-insecure.service: socket + traefik.http.routers.socket-insecure.entrypoints: web + traefik.http.routers.socket-insecure.middlewares: redirect-to-https + traefik.http.routers.socket-secure.rule: Host(`${DOMAIN}`) && PathPrefix(`/api/socket.io`) + traefik.http.routers.socket-secure.service: socket + traefik.http.routers.socket-secure.entrypoints: websecure + traefik.http.routers.socket-secure.tls.certresolver: myresolver # Local domain - traefik.http.routers.worker-local-insecure.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker") - traefik.http.routers.worker-local-insecure.entrypoints: web - traefik.http.routers.worker-local-insecure.service: worker - traefik.http.routers.worker-local-insecure.middlewares: redirect-to-https - traefik.http.routers.worker-api-local-insecure.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker-api") - traefik.http.routers.worker-api-local-insecure.entrypoints: web - traefik.http.routers.worker-api-local-insecure.service: worker-api - traefik.http.routers.worker-api-local-insecure.middlewares: redirect-to-https + traefik.http.routers.socket-local-insecure.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/api/socket.io") + traefik.http.routers.socket-local-insecure.entrypoints: web + traefik.http.routers.socket-local-insecure.service: socket + traefik.http.routers.socket-local-insecure.middlewares: redirect-to-https # Secure - traefik.http.routers.worker-local.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker") - traefik.http.routers.worker-local.entrypoints: websecure - traefik.http.routers.worker-local.tls: true - traefik.http.routers.worker-local.service: worker - traefik.http.routers.worker-api-local.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/worker-api") - traefik.http.routers.worker-api-local.entrypoints: websecure - traefik.http.routers.worker-api-local.tls: true - traefik.http.routers.worker-api-local.service: worker-api + traefik.http.routers.socket-local.rule: Host(`${LOCAL_DOMAIN}`) && PathPrefix("/api/socket.io") + traefik.http.routers.socket-local.entrypoints: websecure + traefik.http.routers.socket-local.tls: true + traefik.http.routers.socket-local.service: socket networks: tipi_main_network: