{"id":21867460,"url":"https://github.com/dz0ny/wrap2","last_synced_at":"2026-04-13T01:18:32.696Z","repository":{"id":64306243,"uuid":"131320062","full_name":"dz0ny/wrap2","owner":"dz0ny","description":"Pid1 manager with templates, cron and logger","archived":false,"fork":false,"pushed_at":"2021-04-15T08:40:44.000Z","size":69,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-24T08:48:29.786Z","etag":null,"topics":["docker","pid1","procfile","template"],"latest_commit_sha":null,"homepage":"","language":"Go","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/dz0ny.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":"2018-04-27T16:22:20.000Z","updated_at":"2022-04-15T21:47:55.000Z","dependencies_parsed_at":"2023-01-15T10:45:25.908Z","dependency_job_id":null,"html_url":"https://github.com/dz0ny/wrap2","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/dz0ny/wrap2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dz0ny%2Fwrap2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dz0ny%2Fwrap2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dz0ny%2Fwrap2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dz0ny%2Fwrap2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dz0ny","download_url":"https://codeload.github.com/dz0ny/wrap2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dz0ny%2Fwrap2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31736055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T22:19:12.206Z","status":"ssl_error","status_checked_at":"2026-04-12T22:18:33.088Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","pid1","procfile","template"],"created_at":"2024-11-28T05:09:31.666Z","updated_at":"2026-04-13T01:18:32.666Z","avatar_url":"https://github.com/dz0ny.png","language":"Go","readme":"# wrap2\n\n`wrap2` is process and configuration manager tailored for Docker with Kubernetes \nenvironment.\n\nIt supports:\n\n- Template generation from environ and secrets\n- Managing multiple processes from single declaration file\n- PID1 handling of system events\n- Cron jobs\n\n\n## Template\n\nFormat is based of Golang default template parser [see](https://golang.org/pkg/text/template/):\n\nExtra functions:\n\n - `env` \u003e gets value from environment\n - `k8s` \u003e load value from secret Kubernetes volume mount\n\n## CRON\n\nBased of https://godoc.org/github.com/robfig/cron:\n\nPredefined schedules:\n```\nEntry                  | Description                                | Equivalent To\n-----                  | -----------                                | -------------\n@yearly (or @annually) | Run once a year, midnight, Jan. 1st        | 0 0 0 1 1 *\n@monthly               | Run once a month, midnight, first of month | 0 0 0 1 * *\n@weekly                | Run once a week, midnight between Sat/Sun  | 0 0 0 * * 0\n@daily (or @midnight)  | Run once a day, midnight                   | 0 0 0 * * *\n@hourly                | Run once an hour, beginning of hour        | 0 0 * * * *\n```\n\n### Example:\n\n```\nENV var example {{env \"CUSTOM\"}}\nSecret var example {{k8s \"secret\"}}\n\n{{if {{env \"DEFINED_ENV_VARIABLE\"}}}} \n    {{k8s \"special_secret\"}}\n{{end}}\n\n```\n\n## Configuration\n\n```toml\n[pre_start]\n  cmd = \"/bin/bash /pre_start\"\n  user = \"dz0ny\"\n[post_start]\n  cmd = \"/bin/bash /post_start\"\n  user = \"dz0ny\"\n\n[[process]]\n  cmd = \"nginx -V -E\"\n  user = \"www-data\"\n  [process.config]\n    src = \"source.tmpl\"\n    out = \"target.tmpl\"\n    [process.config.data]\n      domain = \"test.tld\"\n\n[[process]]\n  cmd = \"php -v\"\n  user = \"www-data\"\n  [process.config]\n    src = \"source.tmpl\"\n    out = \"target.tmpl\"\n   [process.enabled]\n     operator=\"EnvNotEqual\"\n     # EnvEqual \u003e env variable matches value\n     # EnvNotEqual \u003e env variable does not match value\n\n     # EnvNotEndsWith \u003e env variable does not end with value\n     # EnvEndsWith \u003e env variable ends with value\n\n     # EnvNotStartsWith \u003e env variable does not start with value\n     # EnvStartsWith \u003e env variable starts with value\n     key= \"KIND\"\n     value=\"scaled\"\n\n[[process]]\n  cmd = \"true -v\"\n\n[[cron]]\n  schedule = \"@every 5s\"\n  [cron.job]\n    cmd = \"echo tick\"\n    user = \"www-data\"\n```\n\n## Usage\n\n```shell\n$ ./wrap2-Linux-x86_64 -help                                                                                05/09/18 -  1:24 PM\nUsage of ./wrap2-Linux-x86_64:\n  -config string\n        Location of the init file (default \"/provision/init.toml\")\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdz0ny%2Fwrap2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdz0ny%2Fwrap2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdz0ny%2Fwrap2/lists"}