forked from tomimick/restpie3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uwsgi.ini
96 lines (89 loc) · 2.42 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# uwsgi daemon config
# https://uwsgi-docs.readthedocs.io/en/latest/Options.html
# old: local dev - plain python, no docker
[uwsgi-debug]
env = FLASK_ENV=development
env = PYSRV_CONFIG_PATH=conf/server-config.json
http = localhost:8100
master = 1
wsgi-file = py/main.py
callable = app
# processes = 1, otherwise autoreload fails
processes = 1
stats = 127.0.0.1:9100
virtualenv = $(SERVER_VIRTUALENV)
py-autoreload = 1
#harakiri=10 - disable locally, otherwise autoreload fails
disable-logging=1
spooler-quiet=1
spooler-processes=1
spooler-frequency=5
spooler-harakiri=600
spooler = /tmp/my_spooler
# few static files - serve the frontend from elsewhere
static-map = /robots.txt=conf/robots.txt
static-map = /favicon.ico=conf/favicon.ico
# local dev with docker - py-autoreload enabled
[uwsgi-debug-docker]
env = FLASK_ENV=development
env = PYSRV_CONFIG_PATH=/app/real-server-config.json
http = 0.0.0.0:80
# if using nginx and uwsgi_pass:
# uwsgi-socket = localhost:8010
master = 1
wsgi-file = pylocal/main.py
callable = app
processes = 4
chdir = /app/
pythonpath = /app/pylocal/
py-autoreload = 1
disable-logging=1
spooler-quiet=1
spooler-processes=3
spooler-frequency=5
spooler-max-tasks=100
spooler-harakiri=600
spooler = /tmp/pysrv_spooler
vacuum = true
logger = stdio
# workers live max this many requests and secs
max-requests=100
max-worker-lifetime=36000
# few static files - serve the frontend from elsewhere
static-map = /robots.txt=conf/robots.txt
static-map = /favicon.ico=conf/favicon.ico
# test/production server config - plain python and docker
[uwsgi-production]
env = PYSRV_CONFIG_PATH=/app/real-server-config.json
http = 0.0.0.0:80
# if using nginx and uwsgi_pass:
# uwsgi-socket = localhost:8010
master = 1
wsgi-file = py/main.py
callable = app
processes = 4
chdir = /app/
pythonpath = /app/py/
# deploy-script touches this file and uwsgi restarts
touch-reload=/app/VERSION
harakiri=20
disable-logging=1
spooler-quiet=1
spooler-processes=3
spooler-frequency=5
spooler-max-tasks=100
spooler-harakiri=600
spooler = /tmp/pysrv_spooler
vacuum = true
# log to file (and stdout too so docker run locally works)
logger = file:/app/app.log
logger = stdio
# run as this user - MUST SET LOWER PRIVILEGES!
; uid=appuser
; gid=appgroup
# workers live max this many requests and secs
max-requests=100
max-worker-lifetime=36000
# few static files - serve the frontend from elsewhere
static-map = /robots.txt=conf/robots.txt
static-map = /favicon.ico=conf/favicon.ico