{"id":22694885,"url":"https://github.com/f1nnix/docker-enfetch","last_synced_at":"2026-05-09T01:08:28.265Z","repository":{"id":50210830,"uuid":"96012002","full_name":"f1nnix/docker-enfetch","owner":"f1nnix","description":"A tiny tools to pull existing Docker compose' environmental variables to re-usable YAML config","archived":false,"fork":false,"pushed_at":"2022-12-08T02:50:08.000Z","size":6,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T18:42:35.661Z","etag":null,"topics":["docker","docker-compose","docker-environment","dockerfiles"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/f1nnix.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-07-02T08:47:38.000Z","updated_at":"2018-09-27T12:48:01.000Z","dependencies_parsed_at":"2022-09-01T06:30:20.085Z","dependency_job_id":null,"html_url":"https://github.com/f1nnix/docker-enfetch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1nnix%2Fdocker-enfetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1nnix%2Fdocker-enfetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1nnix%2Fdocker-enfetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f1nnix%2Fdocker-enfetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f1nnix","download_url":"https://codeload.github.com/f1nnix/docker-enfetch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246223274,"owners_count":20743158,"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","docker-compose","docker-environment","dockerfiles"],"created_at":"2024-12-10T03:10:09.977Z","updated_at":"2026-05-09T01:08:23.244Z","avatar_url":"https://github.com/f1nnix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-enfetch\n\nA tiny script to restore existing Docker containers' environmental variables to re-usable YAML config.\n\n## Why?\n\nDeploying an app with Docker-compose, you often split `compose`-file into several ones. Like:\n\n```\ndocker-compose \\\n    -f docker-compose.base.yml \\ \u003c== base file with common containers config\n    -f docker-compose.live.yml \\ \u003c== production-specific options\n    -f docker-compose.cred.yml \\ \u003c== credentials, like passwords, AWS keys,etc\n    up -d\n```\n\nFile `docker-compose.cred.yml` is not commited into repository. But to update app, or deploy a new version, you need exactly the same `docker-compose.cred.yml`-file, which you initially deployed your app with.\n\n**This small tool analyzes existing docker containers and restores original `compose` -files with environent variables.**\n\n## Install\n\nJust install deps:\n\n```sh\ncd \u003cpath-to-repo\u003e\npip install -r requirements.txt\n```\n\n## Usage\n\nEnv into current docker-host // docker-mahcine profile like:\n\n```\ndocker-machine env \u003cmachine-name\u003e\neval $(docker-machine env \u003cmachine-name\u003e)\n```\n\nAfter this, your docker env vars will be set (`DOCKER_TLS_VERIFY`, `DOCKER_HOST`, `DOCKER_CERT_PATH`, `DOCKER_MACHINE_NAME`, etc).\n\nStart docker-enfetch:\n\n```sh\npython ~/docker-enfetch/enfetch.py\n```\n\nAn output wiil be like:\n\n```yml\nversion: 2\nservices:\n  db:\n    environment:\n      POSTGRES_PASSWORD: \u003cfiltered\u003e\n  web:\n    environment:\n      APP_URL: \u003cfiltered\u003e\n      DBPASS: \u003cfiltered\u003e\n      DEVISE_SECRET_KEY: \u003cfiltered\u003e\n      PORT: 80\n      RACK_ENV: production\n      RAILS_ENV: production\n      RAILS_SERVE_STATIC_FILES: 1\n      SECRET_KEY_BASE: \u003cfiltered\u003e\n```\n\nObviously, insted of `\u003cfiltered\u003e` you'll get real creds from containers' env var.\n\nSo, pipe output into real file:\n\n```sh\npython ~/docker-enfetch/enfetch.py \u003e live/docker-compose.creds.yml\n```\n\nAnd you'll done!\n\n## LICENSE\n\n(C) 2017, f1nnix, [WTFPL](https://en.wikipedia.org/wiki/WTFPL) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1nnix%2Fdocker-enfetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff1nnix%2Fdocker-enfetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff1nnix%2Fdocker-enfetch/lists"}