diff --git a/config/env/dev.env.example b/config/env/dev.env.example index 38d8e382..f596affc 100644 --- a/config/env/dev.env.example +++ b/config/env/dev.env.example @@ -1,13 +1,13 @@ DEBUG=True SECRET_KEY=foo -DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1] + SQL_ENGINE=django.db.backends.postgresql SQL_DATABASE=balancer_dev SQL_USER=balancer SQL_PASSWORD=balancer SQL_HOST=db SQL_PORT=5432 -DATABASE=postgres + LOGIN_REDIRECT_URL= OPENAI_API_KEY= ANTHROPIC_API_KEY= diff --git a/deploy/manifests/balancer/base/secret.template.yaml b/deploy/manifests/balancer/base/secret.template.yaml index 9abb6e3b..e003a6ce 100644 --- a/deploy/manifests/balancer/base/secret.template.yaml +++ b/deploy/manifests/balancer/base/secret.template.yaml @@ -13,7 +13,6 @@ metadata: namespace: balancer type: Opaque stringData: - DATABASE: postgres DEBUG: '1' LOGIN_REDIRECT_URL: '' OPENAI_API_KEY: openapi_key_here diff --git a/server/balancer_backend/settings.py b/server/balancer_backend/settings.py index df62d198..16764f0e 100644 --- a/server/balancer_backend/settings.py +++ b/server/balancer_backend/settings.py @@ -29,7 +29,7 @@ # Fetching the value from the environment and splitting to list if necessary. # Fallback to '*' if the environment variable is not set. -ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split() +ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "*").split() # If the environment variable contains '*', the split method would create a list with an empty string. # So you need to check for this case and adjust accordingly. diff --git a/server/entrypoint.prod.sh b/server/entrypoint.prod.sh index 68dfbc88..3ab59e2e 100755 --- a/server/entrypoint.prod.sh +++ b/server/entrypoint.prod.sh @@ -1,6 +1,6 @@ #!/bin/sh -if [ "$DATABASE" = "postgres" ] +if [ "$SQL_ENGINE" = "django.db.backends.postgresql" ] then echo "Waiting for postgres..." diff --git a/server/entrypoint.sh b/server/entrypoint.sh index 2d2c872f..f81a0b8f 100755 --- a/server/entrypoint.sh +++ b/server/entrypoint.sh @@ -1,6 +1,6 @@ #!/bin/sh -if [ "$DATABASE" = "postgres" ] +if [ "$SQL_ENGINE" = "django.db.backends.postgresql" ] then echo "Waiting for postgres..."