{"id":18983580,"url":"https://github.com/alivx/auto-config-generator","last_synced_at":"2025-04-19T20:11:41.478Z","repository":{"id":263189334,"uuid":"250317437","full_name":"alivx/auto-config-generator","owner":"alivx","description":"Auto nginx, Jenkins, Haproxy configuration generator.","archived":false,"fork":false,"pushed_at":"2020-04-07T22:37:09.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T12:55:08.952Z","etag":null,"topics":["configuration","configuration-management","haproxy","jenkins","jinja2","nginx","nginx-proxy"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alivx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-26T16:51:12.000Z","updated_at":"2023-10-30T13:29:20.000Z","dependencies_parsed_at":"2024-11-17T00:19:15.883Z","dependency_job_id":null,"html_url":"https://github.com/alivx/auto-config-generator","commit_stats":null,"previous_names":["alivx/auto-config-generator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Fauto-config-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Fauto-config-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Fauto-config-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alivx%2Fauto-config-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alivx","download_url":"https://codeload.github.com/alivx/auto-config-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249246246,"owners_count":21237013,"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":["configuration","configuration-management","haproxy","jenkins","jinja2","nginx","nginx-proxy"],"created_at":"2024-11-08T16:17:41.120Z","updated_at":"2025-04-16T13:33:57.683Z","avatar_url":"https://github.com/alivx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### auto configuration generator\n\nThis repo will including multi-service such as (Jenkins pipeline, Haproxy, Nginx,monit) configuration, for now, I included Nginx only and later I will be including the rest service.\n\nThis script based on Jinja2 and python and template file in order to generate the config file.\n\n\n### The current service this repo support:\n1. Nginx.\n2. Monit\n\n\n## To do\n1. Add advance nginx config such a caching, security...\n2. Add Haproxy config\n3. Add Jenkins Pipeline.\n4. Dockerize new config as a docker image.\n5. Add web interface.\n\n### Usesages:\n\nA. Change the nginx config parameters in `config/nginx_conf.json`\n```json\n[\n    {\n        \"domain_name\": \"alivx.com\", // server name\n        \"isADefaultDomain\": true, // if this domain is the main one in the server\n        \"ssl_certificate\": \"/etc/nginx/ssl/cert.pem\", // SSl Cert\n        \"ssl_certificate_key\": \"/etc/nginx/ssl/key.pem\", // SSL Key\n        \"access_log\": \"/var/log/nginx/$server_name.access.log\", // Access log\n        \"error_log\": \"/var/log/nginx/$server_name.error.log\", // Error Log\n        \"securityHeader\": false, // if you want to include the extra securty header\n        \"backends\": [ //Up stream server for the backend\n            {\n                \"name\": \"api\", // Upstream name \n                \"host\": \"127.0.0.1\", //backend host \n                \"port\": 8001, // backend port\n                \"protocol\": \"https\", //protocol https/https..etc\n                \"urlLocation\": \"/\" // local \"/\" or  \"/api\" for exm: alivx.com/api will redirect to this backend \n            },\n            {\n                \"name\": \"orders\",\n                \"host\": \"localhost\",\n                \"port\": 8002,\n                \"protocol\": \"http\",\n                \"urlLocation\": \"/orders\"\n            },\n            {\n                \"name\": \"doc\",\n                \"host\": \"localhost\",\n                \"port\": 8003,\n                \"protocol\": \"http\",\n                \"urlLocation\": \"/doc\"\n            }\n        ]\n    }\n]\n```\n\n### To generate config files\n\n### Nginx config\n1. first change config config json file `config/nginx_conf.json`, by changing the needed variables.\n2. run the script `python nginx.py`\n3. copy output config file `ConfigOutput/[name].conf` to `/etc/nginx/sites-enabled/`\n4. test config via `nginx configtest`\n5. restart/reload the service `service nginx reload/restart`\n\n\n### Monit config\n1. first change config config json file config/monit.json, by changing the needed variables.\n2. run the script `python monit.py`\n3. copy output file `ConfigOutput/[name].conf` to `/etc/monitrc`\n4. reload the monit service, `monit quit`, then `monit`\n\n\nNote: File name based in the domain name in the config file","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falivx%2Fauto-config-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falivx%2Fauto-config-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falivx%2Fauto-config-generator/lists"}