requarks / wiki-v1

Legacy version (1.x) of Wiki.js
https://wiki.js.org
GNU Affero General Public License v3.0
101 stars 75 forks source link

Docker Container Fails to Start #229

Open coreybutler opened 5 years ago

coreybutler commented 5 years ago

Actual behavior

The container doesn't start on Docker for macOS/Windows.

Expected behavior

The container should run.

Steps to reproduce the behavior

Setup a new container using Docker for macOS/Windows.


This is basically the same as issue #224.

The problem has to do with an invalid environment variable check at https://github.com/Requarks/wiki-v1/blob/master/server/init.js#L16. By default, the environment variable is 1, which is incorrect. When setting this to 0 in Docker for macOS/Windows, it still fails because the process.env.WIKI_JS_HEROKU variable is a string, not a boolean. Passing in true or false also yields the wrong result because Docker will always receive environment variables as strings, so the if/else check will always evaluate to true.

image

image

This results in the following output in Docker for macOS:

image

coreybutler commented 5 years ago

With PR #230 applied, the app starts as expected.

image