codex-team / codex.docs

Free Docs app powered by Editor.js ecosystem
https://docs.codex.so
Apache License 2.0
708 stars 71 forks source link

Codex crashing on startup #318

Open Bag72 opened 6 months ago

Bag72 commented 6 months ago

My CodeX instance has started crashing on startup.

I've looked but can't see anyone with any similar errors nor can I find any details about what could be wrong. I've attached the output to the docker log file. I've rebuilt the container but nor deleted the files as I want to access them.

Any ideas on what is wrong?

Dave

CodeX Reference Error.txt

Bag72 commented 6 months ago

OK. I made a bit of progress. In another thread it was suggested by @gribanoveu that I add in config

frontend: menu:

Which I did do. It didn't work but at the same time it didn't crash so I left it in. Now it is crashing. I edited the changes from the file and it now starts up OK. Which I assumed is docs-config.yaml. Documentation on this is sparse.

What is the correct way to add this to the config file.

gribanoveu commented 6 months ago

@Bag72 configs, uses local db on disk, not in docker volume.

version: "3.2"
services:
  docs:
    container_name: codex_doc
    image: ghcr.io/codex-team/codex.docs:v2.2.3
    restart: always
    ports:
      - 3000:3000
    environment:
      - APP_CONFIG_auth_password=codex
      - APP_CONFIG_frontend_title=WIKI
    volumes:
      - ./uploads:/usr/src/app/uploads
      - ./db:/usr/src/app/db
      - ./docs-config.yaml:/usr/src/app/docs-config.yaml

docs-config.yaml

port: 3000
host: "localhost"
uploads:
  driver: "local"
  local:
    path: "./uploads"

frontend:
  startPage: ""
  menu:
    - title: Login
      uri: "/auth"

database:
  driver: local # you can change database driver here. 'mongodb' or 'local'
  local:
    path: ./db
#  mongodb:
#    uri: mongodb://localhost:27017/docs