엔지니어링
Nginx 설정을 Python 코드로 관리
warpmemory
2020. 2. 26. 18:14
신뢰성 있고 빠르게 Nginx 설정 파일을 json 형식 데이터로 파싱 하고,
반대로 빌드할 수 있는, Python 모듈 crossplane을 소개합니다.
Nginx text 설정을 json 형식 데이터로 변환
crossplane parse --indent 4 --include-comments /home/apps/nginx/conf/nginx.conf > nginx.conf.json
Nginx Json 형식 설정 데이터를 text 설정으로 변환
crossplane build --stdout nginx.conf.json
nginxinc/crossplane
Quick and reliable way to convert NGINX configurations into JSON and back. - nginxinc/crossplane
github.com