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.47k stars 2.71k forks source link

Dockerfile does not run initial configuration wizard #115

Closed ve2dmn closed 7 years ago

ve2dmn commented 7 years ago

Actual behavior

Building the Dockerfile does not run the initial configure setup. This means that:

  1. there is no option to create the administrator account
  2. The git, mongodb, auth and similar configurations must be made manually inside the config file

Expected behavior

Either:

  1. an entrypoint script that checks for the existence of something like config.yml file and runs node wiki configure 3000 on first run. (and node server on following runs)

  2. The option to pass the initial configuration via environnement variable (similar to how the docker images for mysql are done). Each element could be tested during the build process, similar to how the initial configuration wizard test connection to MongoDB and intial repo configurations.

Steps to reproduce the behavior

  1. Clone the repository
  2. build the docker file: docker build -t wikijs .
  3. Run the resulting docker container: docker run -p 3000:3000 wikijs

Current workaround

  1. Run the resulting docker container: docker run -p 3000:3000 -p31001:31001 wikijs
  2. Enter the container using bash : docker exec -it <container id> bash
  3. Run node wiki configure 31001 inside the container
  4. Navigate to http://localhost:31001 and follow the initial config wizard
  5. Once the configuration is done, restart the docker container: docker restart <container id>
NGPixel commented 7 years ago

The Dockerfile is not ready yet, we are still working on it.

I'll leave this ticket open until we have a stable version.