Skip to content

Commit eecc34a

Browse files
committed
adding migrations for production
1 parent bd4e0c7 commit eecc34a

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

docker-compose.prod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.7'
33
services:
44
web:
55
image: ${WEB_IMAGE}
6-
command: gunicorn pythondjango.wsgi:application --bind 0.0.0.0:8000
6+
command: docker-compose -f docker-compose.prod.yml exec web python manage.py migrate --noinput gunicorn pythondjango.wsgi:application --bind 0.0.0.0:8000
77
volumes:
88
- static_volume:/static
99
expose:

index/templates/504.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% extends "errorbase.html" %}
2+
3+
{% block title %}Service unavailable{% endblock %}
4+
5+
{% block error_code %}
6+
504
7+
{% endblock %}
8+
{% block code_description %}
9+
Gateway time-out
10+
{% endblock %}

index/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,10 @@ def handler503(request, exception):
3737
return render(request, "index/503.html", {
3838
"exception": exception
3939
})
40-
40+
41+
42+
def handler504(request, exception):
43+
"""Display a custom 504"""
44+
return render(request, "index/504.html", {
45+
"exception": exception
46+
})

0 commit comments

Comments
 (0)