From 7dd45cc2e8bd5f84708f0925b7ffb89ce3fa4efd Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sat, 25 Apr 2020 11:15:42 -0400 Subject: [PATCH] explain how to use environment variables --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1576364..dbf05b1 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,23 @@ My CI testing pipeline for a django project. -[![pipeline status](http://gitlab.ducoterra.net/ducoterra/ci_builder/badges/master/pipeline.svg)](http://gitlab.ducoterra.net/ducoterra/ci_builder/-/commits/master) \ No newline at end of file +[![pipeline status](http://gitlab.ducoterra.net/ducoterra/ci_builder/badges/master/pipeline.svg)](http://gitlab.ducoterra.net/ducoterra/ci_builder/-/commits/master) + +## Django Environment Variables + +### Django Secret + +```bash +kubectl create secret generic django-secrets --from-literal=SECRET_KEY=$(python -c "import secrets ; print(secrets.token_urlsafe(32))") +``` + +### Django Allowed Hosts + +```yaml +apiVersion: v1 +kind: ConfigMap +metadata: + name: test +data: + ALLOWED_HOSTS: localhost,test.ducoterra.net +```