Skip to content

Commit

Permalink
fix: Corrigindo deploy no DigitalOcean
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Sep 20, 2024
1 parent 92b35a2 commit d33e34a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 29 additions & 9 deletions web/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
},
},
}

0 comments on commit d33e34a

Please sign in to comment.