Я использую traefik 2.0 (v2) и пытаюсь настроить bitwardenrs на моем сервере.
Это мой docker-compose.yml:
version: "3"
services:
bitwarden:
image: bitwardenrs/server
restart: always
volumes:
- ./bw-data:/data
environment:
WEBSOCKET_ENABLED: "true" # Required to use websockets
SIGNUPS_ALLOWED: "false"
ADMIN_TOKEN: "myadmintoken"
networks:
- traefik_network
labels:
- "traefik.enable=true"
- "traefik.http.routers.bitwardenRouter.rule=Host(`mywebsite.com`)"
- "traefik.http.routers.bitwardenRouter.entrypoints=web-secured"
- "traefik.http.routers.bitwardenRouter.tls=true"
- "traefik.http.routers.bitwardenRouter.tls.options=default"
- "traefik.http.routers.bitwardenRouter.tls.certResolver=letsencrypt"
networks:
traefik_network:
external: true
Когда яЯ делаю это, у меня есть одна ошибка:
bitwarden_1 | [2019-10-20 15:12:07][rocket::rocket][INFO] POST /notifications/hub/negotiate text/plain; charset=UTF-8:
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Matched: POST /notifications/hub/negotiate (negotiate)
bitwarden_1 | [2019-10-20 15:12:07][rocket::rocket][INFO] GET /api/sync?excludeDomains=true application/json:
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Matched: GET /api/sync?<data..> (sync)
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Outcome: Success
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Response succeeded.
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Outcome: Success
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Response succeeded.
bitwarden_1 | [2019-10-20 15:12:07][rocket::rocket][INFO] GET /notifications/hub?id=myId&access_token=myToken:
bitwarden_1 | [2019-10-20 15:12:07][_][INFO] Matched: GET /notifications/hub (websockets_err)
bitwarden_1 | [2019-10-20 15:12:07][bitwarden_rs::error][ERROR] '/notifications/hub' should be proxied to the websocket server or notifications won't work. Go to the README for more info.. '/notifications/hub' should be proxied to the websocket server or notifications won't work. Go to the README for more info.
Это ошибка:
[2019-10-20 15:12:07][bitwarden_rs::error][ERROR] '/notifications/hub' should be proxied to the websocket server or notifications won't work. Go to the README for more info.. '/notifications/hub' should be proxied to the websocket server or notifications won't work. Go to the README for more info.
Я пытался найти, как и с traefik 1.7 я нашел это:
- traefik.hub.frontend.rule=Host:bitwarden.domain.tld;Path:/notifications/hub
- traefik.hub.port=3012
- traefik.hub.protocol=ws
Но это не работает с V2 traefik. Я спрашиваю с этим, но тоже не работает:
- "traefik.http.routers.notificationBitwardenRouter.rule=(Host(`mywebsite.com`) && Path(`/notifications/hub`))"
- "traefik.http.routers.notificationBitwardenRouter.entrypoints=web-secured"
- "traefik.http.services.notificationBitwardenRouter.loadbalancer.server.port=3012"
- "traefik.http.services.notificationBitwardenRouter.loadbalancer.server.protocol=ws"
- "traefik.http.services.notificationBitwardenService.loadBalancer.servers=0.0.0.0:3012"
Кто-то может мне помочь, пожалуйста?