Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass along Env Vars at Narrative startup, fix problematic defaults for docker config #1351

Merged
merged 4 commits into from
Jun 28, 2018

Conversation

sychan
Copy link
Contributor

@sychan sychan commented Jun 28, 2018

These commits modify the Lua code to look for an environment variable called NARR_ENV_VARS which is then inserted into the default docker client config for environment variables passed to along at narrative container startup.

The value for NARR_ENV_VARS should an array of NAME=VALUE strings. For example, the following docker command will startup the nginx container and set the CONFIG_ENV variable to appdev for all narratives started by the Docker.lua module:
docker run -it -v /var/run/docker.sock:/var/run/docker.sock -e 'NARR_ENV_VARS=["CONFIG_ENV=appdev"]' kbase/nginx:latest

This commit also fixes the default docker configs for CMD and USER so that they don't clobber the settings built into the narrative image. The old defaults set CMD to /bin/bash, which stopped the narrative from starting up, and set the running user to nobody, making it impossible to update the config.json file

@coveralls
Copy link

Coverage Status

Coverage remained the same at 13.123% when pulling 2564b33 on dockerize into 47e748b on develop.

@sychan sychan assigned sychan, briehl, kkellerlbl and eapearson and unassigned sychan Jun 28, 2018
@briehl briehl merged commit 38bc1a1 into develop Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants