diff --git a/Dockerfile b/Dockerfile index 1b2887e..1ac4eb2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY . ./ RUN chmod +x bash/run-prod.sh CMD bash/run-prod.sh -HEALTHCHECK CMD ["pipenv", "run", "python", "healthcheck.py"] +HEALTHCHECK --interval=10s --timeout=10s CMD ["pipenv", "run", "python", "healthcheck.py"] ENV DATABASE_URL postgres://postgresql:postgresql@db:5432/manuels ENV SECRET_KEY '' diff --git a/healthcheck.py b/healthcheck.py index 3fef69b..711261c 100644 --- a/healthcheck.py +++ b/healthcheck.py @@ -6,7 +6,7 @@ import requests def main(): port = os.getenv('PORT', 8000) - res = requests.get(f'http://localhost:{port}/') + res = requests.get(f'http://127.0.0.1:{port}/') if res.status_code >= 400: sys.exit(1) diff --git a/manuels_collection/settings.py b/manuels_collection/settings.py index 1a3fc1f..cf7c5dd 100644 --- a/manuels_collection/settings.py +++ b/manuels_collection/settings.py @@ -27,7 +27,7 @@ SECRET_KEY = os.getenv('SECRET_KEY', 'f6j7c0j%-^$r6&hf4!=db1=)88&ve3qwbsgl3ykd22 # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.getenv('DJANGO_ENV', 'prod') == 'dev' -ALLOWED_HOSTS = ['web', ] +ALLOWED_HOSTS = ['web', '127.0.0.1'] if DEBUG: ALLOWED_HOSTS.extend([ 'localhost',