Skip to content

Commit 5721262

Browse files
committed
chore: Update Kind configuration, refactor database and allowed hosts environment variable handling, and adjust Kustomize dev overlay.
1 parent 685c70a commit 5721262

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

config/env/dev.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
DEBUG=True
22
SECRET_KEY=foo
3-
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]
3+
44
SQL_ENGINE=django.db.backends.postgresql
55
SQL_DATABASE=balancer_dev
66
SQL_USER=balancer
77
SQL_PASSWORD=balancer
88
SQL_HOST=db
99
SQL_PORT=5432
10-
DATABASE=postgres
10+
1111
LOGIN_REDIRECT_URL=
1212
OPENAI_API_KEY=
1313
ANTHROPIC_API_KEY=

deploy/manifests/balancer/base/secret.template.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ metadata:
1313
namespace: balancer
1414
type: Opaque
1515
stringData:
16-
DATABASE: postgres
1716
DEBUG: '1'
1817
LOGIN_REDIRECT_URL: ''
1918
OPENAI_API_KEY: openapi_key_here

server/balancer_backend/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# Fetching the value from the environment and splitting to list if necessary.
3131
# Fallback to '*' if the environment variable is not set.
32-
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS", "*").split()
32+
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "*").split()
3333

3434
# If the environment variable contains '*', the split method would create a list with an empty string.
3535
# So you need to check for this case and adjust accordingly.

server/entrypoint.prod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
if [ "$DATABASE" = "postgres" ]
3+
if [ "$SQL_ENGINE" = "django.db.backends.postgresql" ]
44
then
55
echo "Waiting for postgres..."
66

server/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
if [ "$DATABASE" = "postgres" ]
3+
if [ "$SQL_ENGINE" = "django.db.backends.postgresql" ]
44
then
55
echo "Waiting for postgres..."
66

0 commit comments

Comments
 (0)