From fa59feaf773f7bf21e008ba6aeca46061eb6a79d Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 20 Sep 2024 12:09:20 -0300 Subject: [PATCH] docker: allow config of ALLOWED_HOSTS --- dhub/settings.py | 2 +- docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dhub/settings.py b/dhub/settings.py index 6e83032..6ba2855 100644 --- a/dhub/settings.py +++ b/dhub/settings.py @@ -29,7 +29,7 @@ SECRET_KEY = "django-insecure-1p8rs@qf$$l^!vsbetagojw23kw@1ez(qi8^(s0t!wyh!l3 # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='[]', cast=Csv() # Application definition diff --git a/docker-compose.yml b/docker-compose.yml index b6e2d01..6226f1a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,7 +4,8 @@ services: build: dockerfile: docker/devicehub-django.Dockerfile environment: - DEBUG: true + - DEBUG: true + - ALLOWED_HOSTS=* volumes: - .:/opt/devicehub-django ports: