{"id":16339824,"url":"https://github.com/kritzcreek/dockerconfig-ng","last_synced_at":"2025-11-04T03:30:37.397Z","repository":{"id":57214055,"uuid":"82923310","full_name":"kritzcreek/dockerconfig-ng","owner":"kritzcreek","description":"Dockerconfig done right","archived":false,"fork":false,"pushed_at":"2017-03-08T09:47:20.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T07:11:39.511Z","etag":null,"topics":["docker","purescript","smug"],"latest_commit_sha":null,"homepage":null,"language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kritzcreek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-23T12:02:18.000Z","updated_at":"2017-07-22T18:06:54.000Z","dependencies_parsed_at":"2022-08-29T01:50:54.440Z","dependency_job_id":null,"html_url":"https://github.com/kritzcreek/dockerconfig-ng","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fdockerconfig-ng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fdockerconfig-ng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fdockerconfig-ng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fdockerconfig-ng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kritzcreek","download_url":"https://codeload.github.com/kritzcreek/dockerconfig-ng/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239425429,"owners_count":19636346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","purescript","smug"],"created_at":"2024-10-10T23:55:14.671Z","updated_at":"2025-11-04T03:30:37.313Z","avatar_url":"https://github.com/kritzcreek.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"dockerconfig-ng\n===\n\n*Forked from https://github.com/krystianity/dockerconfig*\n\n- easy nodejs config for docker (overwrite with ENV vars)\n- you must not use \"_\" in your variable names\n- check ./test if you dont understand the readme example (you can run \"npm test\" to try it)\n\n```javascript\n//somewhere in your init script/class\n\nconst dockerconfig = require(\"dockerconfig-ng\");\n\n//myConfigData = { port: 1234, nested: { something: \"no\" } };\nconst myConfigData = require(\"./config.json\");\nconst config = dockerconfig.getConfig(myConfigData);\nglobal.CONFIG = config;\n\n//somewhere else\n\nconsole.log(CONFIG.port);\nconsole.log(CONFIG.nested.something);\n\n//your dockerfile\n\nFROM node:6-onbuild\n```\n\n```bash\n# building \u0026 run docker image\n# with environment variables to overwrite config data\n\ndocker build -t my-config-test .\ndocker run -e NODE_CONFIG_PORT=5555 -e NODE_CONFIG_NESTED_SOMETHING=yes my-config-test\n\n# outputs:\n\n# 555 instead of 1234\n# \"yes\" instead of \"no\"\n```\n\n## config versioning\n\n- optional\n\nVersioning helps you to keep application-image and deployment-configuration (via environment-variables) in sync, \nsince it's not always possible to keep all config-changes backwards-compatible or provide sane defaults.   \n\n### Usage\n\nIn your application/image add a key *configVersion* to your *config.json* (or rather: config-object). \nThe *configVersion* must be a number, using timestamps is recommended:\n\n```json\n{\n  \"configVersion\": 1464091200\n}\n```\n\nNext add the environment variable *NODE_CONFIG_CONFIGVERSION* with the very same value when running your container:\n\n```bash\n$ docker run -e NODE_CONFIG_CONFIGVERSION=1464091200 my-application \n```\n\nNow `dockerconfig.getConfig()` will throw an exception on version-mismatch.\n\n## Building\n\n`bower install \u0026\u0026 npm install \u0026\u0026 npm run compile`\n\n## Authors\n- Christoph Hegemann, \u003cchristoph.hegemann1337@gmail.com\u003e (smug forker)\n- Christian Fröhlingsdorf, chris@5cf.de (original author)\n- Elmar Athmer, elmar@athmer.org (contributor)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkritzcreek%2Fdockerconfig-ng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkritzcreek%2Fdockerconfig-ng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkritzcreek%2Fdockerconfig-ng/lists"}