docat-org/docat

Config file `config.json` not working

Closed this issue · 1 comments

Using the config.json as described in the README doesn't work.

Steps to reproduce

Create a config.json file with the content

{
  "headerHTML": "<h1>TEST</h1>"
}

in my workspace.

This is my docker compose file

services:
  docs-server:
    image: ghcr.io/docat-org/docat
    volumes:
      - ./appdata/docs/:/var/docat/
      - ./config.json:/var/www/html/config.json
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=proxy"
      - "traefik.http.services.docs-server.loadbalancer.server.port=80"
      - "traefik.http.routers.docs-server.service=docs-server"
      - "traefik.http.routers.docs-server.entrypoints=web"
      - "traefik.http.routers.docs-server.rule=Host(`localhost`)"
  reverse-proxy:
    container_name: reverse-proxy
    image: traefik:v2.10.3
    restart: always
    command:
      - --global.checknewversion=true
      - --global.sendanonymoususage=false
      - --entrypoints.web.address=:80
      - --log.level=INFO
      - --providers.docker.exposedbydefault=false
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    ports:
      - "80:80"

Running docker compose up serves docat on http://localhost, however this is the log

Failed to load resource: the server responded with a status of 404 (Not Found) /doc/config.json:1 

Possible fix

Changing the bind mounts to

- ./appdata/docs/:/var/docat/
- ./config.json:/var/docat/doc/config.json

works

Thanks for reporting this was broken with a refactoring and never correctly updated in the docs