Nextcloud 無法連接到 Collabora

Nextcloud 無法連接到 Collabora

我已經設定了一個 docker 主機,並且想要使用 collabora-office 設定 nextcloud。但它根本找不到 collabora 主機。我的撰寫文件如下:

version: '3.2'

services:
  db:
    image: mariadb:10.5
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_DATABASE=xxx-nextcloud
      - MYSQL_USER=xxxnc
      - MYSQL_PASSWORD=evilcorp
      - MARIADB_RANDOM_ROOT_PASSWORD=yes

  nextcloud:
    image: nextcloud:20

    restart: always

    volumes:
      - nextcloud:/var/www/html
    environment:
      - MYSQL_DATABASE=vow-nextcloud
      - MYSQL_USER=xxxnc
      - MYSQL_PASSWORD=evilcorp
      - MYSQL_HOST=db:3306
    networks:
      - proxy
      - default
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud.entrypoints=http"
      - "traefik.http.routers.nextcloud.rule=Host(`storage.xxx.org`)"
      - "traefik.http.middlewares.nextcloud-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.nextcloud.middlewares=nextcloud-https-redirect"
      - "traefik.http.routers.nextcloud-secure.entrypoints=https"
      - "traefik.http.routers.nextcloud-secure.rule=Host(`storage.xxx.org`)"
      - "traefik.http.routers.nextcloud-secure.tls=true"
      - "traefik.http.routers.nextcloud-secure.tls.certresolver=http"
      - "traefik.docker.network=proxy"
    depends_on:
      - db

  collabora:
    image: collabora/code:latest
    restart: always
    networks:
      - default
      - proxy
    ports:
      - 9980:9980
    cap_add:
     - MKNOD
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - domain=storage\\.xxx\\.org
      - extra_params=--o:ssl.enable=false --o:ssl.termination=true
      - DONT_GEN_SSL_CERT=YES

    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.office.entrypoints=http"
      - "traefik.http.routers.office.rule=Host(`office.xxx.org`)"
      - "traefik.http.middlewares.office-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.office.middlewares=office-https-redirect"
      - "traefik.http.routers.office-secure.entrypoints=https"
      - "traefik.http.routers.office-secure.rule=Host(`office.xxx.org`)"
      - "traefik.http.routers.office-secure.tls=true"
      - "traefik.http.routers.office-secure.tls.certresolver=http"
      - "traefik.http.services.nextcloud.loadbalancer.server.port=9980"

volumes:
  db:
  nextcloud:

networks:
  proxy:
    external: true

有人能幫我嗎?當我在 nextcloud 中啟動 collabora-app 並輸入時https://office.xxx.org正如 collabora 位址所示:“無法連接到 collabora 線上伺服器”

伺服器已啟動並正在運行,在瀏覽器中我可以透過 office.xxx.org 存取它並獲得“OK”作為回應。

(如你可能看到的,docker 主機上還運行著一個 traefik-proxy 容器)

答案1

如果你的 docker 主機正在運行 ufw-firewall,請嘗試:ufw allow https 這對我有很大幫助;)

相關內容