services: db: image: postgres:15-alpine environment: POSTGRES_DB: wiki POSTGRES_PASSWORD: wikijsrocks POSTGRES_USER: wikijs logging: driver: "none" restart: unless-stopped volumes: - db-data:/var/lib/postgresql/data networks: - wikijs wiki: image: ghcr.io/requarks/wiki:2 depends_on: - db environment: DB_TYPE: postgres DB_HOST: db DB_PORT: 5432 DB_USER: wikijs DB_PASS: wikijsrocks DB_NAME: wiki logging: driver: "json-file" options: max-size: "10m" max-file: "3" restart: unless-stopped ports: - "3000:3000" networks: - wikijs # MCP server bridging agents and the wiki instance. # Runs the Streamable HTTP transport (built from the current source tree). # # 0.0.0.0 is a non-loopback bind, so the image validation (src/config) # requires WIKIJS_MCP_BEARER_TOKEN — set it to a long random value. # To keep the listener on the host-only interface, use 127.0.0.1 instead # and drop the published port. mcp: build: . depends_on: - wiki environment: WIKIJS_MCP_TRANSPORT: http WIKIJS_MCP_HOST: 0.0.0.0 WIKIJS_MCP_PORT: "3001" WIKIJS_MCP_BEARER_TOKEN: ${WIKIJS_MCP_BEARER_TOKEN:?set a bearer token for the non-loopback MCP bind} WIKIJS_URL: http://wiki:3000 WIKIJS_API_KEY: ${WIKIJS_API_KEY:?create an API key in the wiki first (Admin > API Access)} WIKIJS_ENABLE_EDIT: ${WIKIJS_ENABLE_EDIT:-false} restart: unless-stopped ports: - "3001:3001" healthcheck: test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3001/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 30s timeout: 5s retries: 3 networks: - wikijs volumes: db-data: networks: wikijs: driver: bridge