diff --git a/Dockerfile b/Dockerfile index 39e6214..fd1143a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,7 @@ COPY .env.example .env RUN poetry install --no-interaction --no-ansi --no-root # Collect static files +RUN make sass RUN python manage.py collectstatic --noinput # Compile translations diff --git a/web/settings.py b/web/settings.py index 98c6ff8..77f6a1f 100644 --- a/web/settings.py +++ b/web/settings.py @@ -46,15 +46,14 @@ ENV = env("ENV") -ALLOWED_HOSTS = ( - [ - "queremossaber.org.br", - "staging.queremossaber.org.br", - ] - + ["localhost", "127.0.0.1"] - if DEBUG - else [] -) +allowed_hosts_dev = [] +if ENV == "dev": + allowed_hosts_dev = ["localhost", "127.0.0.1"] + +ALLOWED_HOSTS = [ + "queremossaber.org.br", + "staging.queremossaber.org.br", +] + allowed_hosts_dev INTERNAL_IPS = [ "127.0.0.1", @@ -211,3 +210,24 @@ "HOST": "localhost", "PORT": 9001, } + +LOGGING = { + "version": 1, + "disable_existing_loggers": False, + "handlers": { + "console": { + "class": "logging.StreamHandler", + }, + }, + "loggers": { + "django": { + "handlers": ["console"], + "propagate": True, + "level": "DEBUG", + }, + "whitenoise": { + "handlers": ["console"], + "level": "DEBUG", + }, + }, +}