Fix healthcheck

This commit is contained in:
Gabriel Augendre 2018-06-20 00:08:37 +02:00
parent c7c7e3f2c2
commit 1e5e5599cf
3 changed files with 3 additions and 3 deletions

View File

@ -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 ''

View File

@ -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)

View File

@ -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',