Do you want to: Ask a how-to question (or Report a bug not so sure)
Document Server version: How do I check?
Type of installation of the Document Server: docker
OS: docker
Browser version: Firefox 96.0.3
Hello, I’m trying to setup document server in my server at address docs.example. com behind traefik v2. All of this using the docker-compose guide
The guide works well without traefik, but when starting traefik and commenting the ports section as shown below, the documents do not load. When creating a new doc in the example page, I’m redirected to a new tab at https://docs.example.com/editor?fileName=new.docx and I get the error “Cannot GET /editor”.
However, I can go back to the example page and open the example document that was created, this opens the editor but the document does not load. Resulting in this error
Please help
docker-compose.yml
version: '2'
services:
onlyoffice-documentserver:
build:
context: .
container_name: onlyoffice-documentserver
depends_on:
- onlyoffice-postgresql
- onlyoffice-rabbitmq
environment:
- DB_TYPE=postgres
- DB_HOST=onlyoffice-postgresql
- DB_PORT=5432
- DB_NAME=onlyoffice
- DB_USER=onlyoffice
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
# Uncomment strings below to enable the JSON Web Token validation.
#- JWT_ENABLED=true
#- JWT_SECRET=secret
#- JWT_HEADER=Authorization
#- JWT_IN_BODY=true
# ports:
# - '80:80'
# - '443:443'
stdin_open: true
restart: always
stop_grace_period: 60s
networks:
onlyOfficeInternal:
traefik:
volumes:
- /var/www/onlyoffice/Data
- /var/log/onlyoffice
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
- /var/www/onlyoffice/documentserver-example/public/files
- /usr/share/fonts
labels:
- traefik.enable=true
- traefik.http.routers.docs.rule=Host(`docs.example.com`)
- traefik.http.routers.docs.tls=true
- traefik.http.routers.docs.tls.certresolver=le
- traefik.http.services.docs.loadbalancer.server.port=80
- traefik.http.routers.docs.service=docs
- traefik.http.routers.docs.entrypoints=websecure
- traefik.docker.network=traefik
- traefik.http.routers.docs-http.entrypoints=web
- traefik.http.routers.docs-http.rule=Host(`docs.example.com`)
- traefik.http.routers.docs-http.middlewares=https-redirect
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
restart: always
networks:
onlyOfficeInternal:
expose:
- '5672'
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:9.5
networks:
onlyOfficeInternal:
environment:
- POSTGRES_DB=onlyoffice
- POSTGRES_USER=onlyoffice
- POSTGRES_HOST_AUTH_METHOD=trust
restart: always
expose:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:
networks:
onlyOfficeInternal:
traefik:
external: true