Skip to content

Commit c99aa03

Browse files
authored
Development: use gunicorn for web and proxito (#9977)
Match production environment by using `gunicorn` instead of the Django development server.
1 parent 2b33b0f commit c99aa03

File tree

9 files changed

+15
-11
lines changed

9 files changed

+15
-11
lines changed

readthedocs/wsgi.py

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""WSGI application helper."""
4-
5-
from __future__ import absolute_import
62
import os
73

8-
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'readthedocs.settings.dev')
4+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "readthedocs.settings.docker_compose")
95

106
# This application object is used by any WSGI server configured to use this
117
# file. This includes Django's development server, if the WSGI_APPLICATION
128
# setting points here.
139
from django.core.wsgi import get_wsgi_application # noqa
14-
application = get_wsgi_application()
1510

16-
# Apply WSGI middleware here.
17-
# from helloworld.wsgi import HelloWorldApplication
18-
# application = HelloWorldApplication(application)
11+
application = get_wsgi_application()

requirements/deploy.in

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
-r pip.txt
44

55
psycopg2
6-
gunicorn
76
django-redis-cache
87

98
# For resizing images

requirements/deploy.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ gitdb==4.0.10
200200
gitpython==3.1.30
201201
# via -r requirements/pip.txt
202202
gunicorn==20.1.0
203-
# via -r requirements/deploy.in
203+
# via -r requirements/pip.txt
204204
idna==3.4
205205
# via
206206
# -r requirements/pip.txt

requirements/docker.txt

+2
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ gitdb==4.0.10
211211
# gitpython
212212
gitpython==3.1.30
213213
# via -r requirements/pip.txt
214+
gunicorn==20.1.0
215+
# via -r requirements/pip.txt
214216
idna==3.4
215217
# via
216218
# -r requirements/pip.txt

requirements/docs.txt

+2
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ gitdb==4.0.10
195195
# gitpython
196196
gitpython==3.1.30
197197
# via -r requirements/pip.txt
198+
gunicorn==20.1.0
199+
# via -r requirements/pip.txt
198200
idna==3.4
199201
# via
200202
# -r requirements/pip.txt

requirements/lint.txt

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ gitdb==4.0.10
203203
# gitpython
204204
gitpython==3.1.30
205205
# via -r requirements/pip.txt
206+
gunicorn==20.1.0
207+
# via -r requirements/pip.txt
206208
idna==3.4
207209
# via
208210
# -r requirements/pip.txt

requirements/pip.in

+2
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,5 @@ django-structlog==2.2.0
130130

131131
structlog
132132
dparse
133+
134+
gunicorn

requirements/pip.txt

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ gitdb==4.0.10
147147
# via gitpython
148148
gitpython==3.1.30
149149
# via -r requirements/pip.in
150+
gunicorn==20.1.0
151+
# via -r requirements/pip.in
150152
idna==3.4
151153
# via requests
152154
imagesize==1.4.1

requirements/testing.txt

+2
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ gitdb==4.0.10
196196
# gitpython
197197
gitpython==3.1.30
198198
# via -r requirements/pip.txt
199+
gunicorn==20.1.0
200+
# via -r requirements/pip.txt
199201
idna==3.4
200202
# via
201203
# -r requirements/pip.txt

0 commit comments

Comments
 (0)