docker: allow config of ALLOWED_HOSTS

This commit is contained in:
pedro 2024-09-20 12:09:20 -03:00
parent f5f0ea3c35
commit fa59feaf77
2 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ SECRET_KEY = "django-insecure-1p8rs@qf$$l^!vsbetagojw23kw@1ez(qi8^(s0t&#7!wyh!l3
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='[]', cast=Csv()
# Application definition # Application definition

View File

@ -4,7 +4,8 @@ services:
build: build:
dockerfile: docker/devicehub-django.Dockerfile dockerfile: docker/devicehub-django.Dockerfile
environment: environment:
DEBUG: true - DEBUG: true
- ALLOWED_HOSTS=*
volumes: volumes:
- .:/opt/devicehub-django - .:/opt/devicehub-django
ports: ports: