我已经设置了一个 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.orgcollabora 地址显示:“无法连接到 collabora 在线服务器”
服务器已启动并运行,在浏览器中我可以通过 office.xxx.org 访问它并得到“OK”作为响应。
(如您所见,docker 主机上还有一个 traefik-proxy 容器正在运行)
答案1
如果您的 docker 主机正在运行 ufw-firewall,请尝试:ufw allow https
这对我帮助很大;)