forked from eskerda/citybikes-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuwsgi.ini
69 lines (58 loc) · 1.68 KB
/
uwsgi.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Taken from: https://github.com/nginxinc/kubernetes-ingress/issues/143#issuecomment-347814243
[uwsgi]
chdir = /usr/src/app
uid = $(UID)
gid = $(GID)
module = $(UWSGI_MODULE)
processes = $(UWSGI_PROCESSES)
threads = $(UWSGI_THREADS)
procname-prefix-spaced = uwsgi:$(UWSGI_MODULE)
http-socket = :5051
http-enable-proxy-protocol = 1
http-auto-chunked = true
http-keepalive = 75
http-timeout = 75
stats = :1717
stats-http = 1
offload-threads = $(UWSGI_OFFLOAD_THREADS)
# Better startup/shutdown in docker:
die-on-term = 1
lazy-apps = 0
vacuum = 1
master = 1
enable-threads = true
thunder-lock = 1
buffer-size = 65535
# Logging
log-x-forwarded-for = true
#memory-report = true
#disable-logging = true
#log-slow = 200
#log-date = true
# Avoid errors on aborted client connections
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true
#listen=1000
#max-fd=120000
no-defer-accept = 1
# Limits, Kill requests after 120 seconds
harakiri = 120
harakiri-verbose = true
post-buffering = 4096
# Custom headers
add-header = X-Content-Type-Options: nosniff
add-header = X-XSS-Protection: 1; mode=block
add-header = Strict-Transport-Security: max-age=16070400
add-header = Connection: Keep-Alive
# Static file serving with caching headers and gzip
static-map = /static=/usr/src/app/api/static
static-gzip-dir = /usr/src/app/api/static
static-expires = /usr/src/app/* 3600
route-uri = ^/static/ addheader:Vary: Accept-Encoding
error-route-uri = ^/static/ addheader:Cache-Control: no-cache
# Cache stat() calls
cache2 = name=statcalls,items=30
static-cache-paths = 86400
# Redirect http -> https
route-if = equal:${HTTP_X_FORWARDED_PROTO};http redirect-permanent:https://${HTTP_HOST}${REQUEST_URI}