requarks / wiki

Wiki.js | A modern and powerful wiki app built on Node.js
https://js.wiki
GNU Affero General Public License v3.0
24.33k stars 2.69k forks source link

First account cannot create home page when using Docker #564

Closed jokarl closed 6 years ago

jokarl commented 6 years ago

Actual behavior

  1. Log in using email specified in WIKI_ADMIN_EMAIL
  2. Use password admin123
  3. Login succeeds, attempt to create home page
  4. The following errors is shown:

image

Expected behavior

Expecting to reach page creation view

Steps to reproduce the behavior

Delete any pre-existing data in specified mongo data folder.

docker-compose.yml

version: '3'
services:
  wikidb:
    image: mongo:latest
    expose:
      - '27017'
    command: '--smallfiles --bind_ip wikidb'
    environment:
      - 'MONGO_LOG_DIR=/dev/null'
    volumes:
      - ./data/mongo:/data/db
  wikijs:
    image: 'requarks/wiki:latest'
    links:
      - wikidb
    depends_on:
      - wikidb
    ports:
      - '3000:3000'
    environment:
      WIKI_JS_HEROKU: 1
      WIKI_ADMIN_EMAIL: admin@default.com
    volumes:
      - ./config.yml:/var/wiki/config.yml

config.yml (reduced to relevant parts):

host: http://localhost:3000
port: 3000
public: true
auth:
  defaultReadAccess: true
  local:
    enabled: true
db: mongodb://wikidb:27017/wiki

User is indeed created as admin:

{
    "_id": ObjectID("5b3e273e37e5ed000960fea0"),
    "updatedAt": ISODate("2018-07-05T14:12:14.829Z"),
    "createdAt": ISODate("2018-07-05T14:12:14.829Z"),
    "provider": "local",
    "email": "admin@default.com",
    "name": "Administrator",
    "password": "$2a$04$MAHRw785Xe/Jd5kcKzr3D.VRZDeomFZu2lius4gGpZZ9cJw7B7Mna",
    "rights": [
    {
        "role": "admin",
        "path": "/",
        "exact": false,
        "deny": false,
        "_id": ObjectID("5b3e273e37e5ed000960fea1")
    }
    ],
    "__v": 0
}

Nothing out of the ordinary shows up in the terminal.

jokarl commented 6 years ago

I just installed a fresh virtual machine and ran the exact same as above on it, and it works. Guessing my problem is local, though I haven't found out what it is yet. Closing this since the error isn't relevant to wiki js.