Skip to content

Commit

Permalink
fix: update liveliness and readiness probes, fix runserver host
Browse files Browse the repository at this point in the history
  • Loading branch information
balavec committed Mar 27, 2024
1 parent cd2f504 commit 7cc5440
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions {{cookiecutter.project_slug}}/k8s/base/django.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
containers:
- name: django
image: {{ cookiecutter.project_slug }}_local_django:latest
command: ["python", "manage.py", "runserver"]
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
ports:
- name: http-server
containerPort: 8000
Expand All @@ -49,20 +49,24 @@ spec:
httpGet:
path: /healthz
port: 8000
host: {{ cookiecutter.domain_name }}
initialDelaySeconds: 15
periodSeconds: 60
httpHeaders:
- name: Host
value: localhost
initialDelaySeconds: 29
periodSeconds: 29
timeoutSeconds: 2
failureThreshold: 3
terminationGracePeriodSeconds: 60
timeoutSeconds: 2
readinessProbe:
httpGet:
path: /readiness
port: 8000
host: {{ cookiecutter.domain_name }}
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 10
httpHeaders:
- name: Host
value: localhost
initialDelaySeconds: 31
periodSeconds: 31
timeoutSeconds: 3
successThreshold: 1
initContainers:
- name: check-db-ready
Expand Down

0 comments on commit 7cc5440

Please # to comment.