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.
This results in the following output in Docker for macOS:
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 to0
in Docker for macOS/Windows, it still fails because theprocess.env.WIKI_JS_HEROKU
variable is astring
, not aboolean
. Passing intrue
orfalse
also yields the wrong result because Docker will always receive environment variables as strings, so the if/else check will always evaluate totrue
.This results in the following output in Docker for macOS: