This tool creates NGINX Plus configuration files for a given JSON service declaration.
Use cases include quick configuration generation and templating.
graph TD
U([User]) -- Terminal --> IW(Interactive wizard)
DEVOPS([DevOps]) -- REST API --> CICD
IW -- REST API --> NCG[NGINX Configuration Generator]
CICD(CI/CD Pipeline) -- REST API --> NCG
NCG -- REST API --> NIM(NGINX Instance Manager)
NCG -- REST API --> Generic(Generic REST API endpoint) & IW & CICD
Two branches are currently available:
- REST API
- Interactive wizard
- Plaintext
- JSON-wrapped Base64-encoded
- Kubernetes Configmap
- POST to Generic REST API endpoint
- NGINX Instance Manager interoperability
- Upstreams
- Servers
- TLS
- Locations
- Rate limiting
- Active healthchecks
- Cookie-based stickiness
- NGINX Plus REST API access
- Custom configuration snippets (for upstreams, servers, locations)
- Caching
Run NGINX Config Generator using:
$ cd src
$ pip install -r requirements.txt
$ python3 main.py
Usage details and JSON schema are available here
A sample Postman collection can be found here
When NGINX Config Generator is running, REST API documentation can be accessed at:
- Documentation and testing: http://127.0.0.1:5000/docs
- Redoc documentation: http://127.0.0.1:5000/redoc
- OpenAPI specification: http://127.0.0.1:5000/openapi.json