https://github.com/defectdojo/django-init-settings
Init container for settings.py
https://github.com/defectdojo/django-init-settings
Last synced: 10 months ago
JSON representation
Init container for settings.py
- Host: GitHub
- URL: https://github.com/defectdojo/django-init-settings
- Owner: DefectDojo
- Created: 2020-09-07T13:27:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T13:50:37.000Z (over 5 years ago)
- Last Synced: 2024-10-29T22:45:06.406Z (about 1 year ago)
- Language: Python
- Size: 10.7 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django-init-settings
Init container for settings.py
Using https://github.com/hairyhenderson/gomplate, process a templatized settings.dist.py to create a custom settings.py with our values.
This is meant to be used as an initContainer in Kubernetes.
`/settings.src.py (templatized settings.dist.py) --> gomplate with /values/settings.yaml --> /settings/settings.py`
## Example with docker
```
$ docker run --rm -v $(pwd)/settings:/settings -v $(pwd)/values:/values defectdojo/django-init-settings -f /settings.src.py -d settings=file:///values/settings.yaml -o /settings/settings.py
```
will produce a process `settings.py` in the `settings` volume. Remove the `-o` to view the result on STDOUT.
For more documentation on gomplate, please visit the official github repo at https://github.com/hairyhenderson/gomplate.