Skip to content

Commit 3c69e97

Browse files
author
Osman
committed
create uwsgi config file
1 parent b5e27d3 commit 3c69e97

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/server/bin/startServer.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@ echo "SLEEPING.. WAITING FOR DB"; sleep 5; echo "WAKING"; alembic upgrade head;
1111

1212
# --no-reload prevents Flask restart, which usually happens in middle of create_base_users()
1313
#TODO: SECURITY - ensure we are not running in debug mode in production
14-
UWSGI_LOG_CONFIG="bin/uwsgi_log_config.json"
15-
# Remove newlines and extra whitespace from log formatting
16-
LOG_FORMAT=$(cat $UWSGI_LOG_CONFIG | tr -d \\n | tr -s ' ')
17-
uwsgi --logformat "$LOG_FORMAT" --http-socket :5000 --plugin python38 --module wsgi:app --chdir /app --pythonpath . --processes 2 --threads 4 --master
14+
uwsgi bin/uwsgi.ini

src/server/bin/uwsgi.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[uwsgi]
2+
http-socket = :5000
3+
plugin = python38
4+
module = wsgi:app
5+
chdir = /app
6+
pythonpath = .
7+
processes = 2
8+
threads = 4
9+
logdate = %%Y-%%m-%%d-T%%H:%%M:%%SZ
10+
logformat = {"timestamp": "%(ftime)", "address": "%(addr)", "method": "%(method)", "protocol": "%(proto)", "resp_size": "%(size)", "request_body_size": "%(cl)", "response_status": "%(status)", "response_time": "%(secs)", "uri": "%(uri)"}
11+
logformat-strftime = true

src/server/bin/uwsgi_log_config.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)