-
Notifications
You must be signed in to change notification settings - Fork 2
/
start_service_debug.sh
38 lines (31 loc) · 1.15 KB
/
start_service_debug.sh
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
#!/bin/bash
# check the gunicorn config params
#
if [ -z ${OCR_SERVICE_HOST+x} ]; then
OCR_SERVICE_HOST=0.0.0.0
echo "OCR_SERVICE_HOST is unset -- setting to default: $OCR_SERVICE_HOST"
fi
if [ -z ${OCR_SERVICE_PORT+x} ]; then
OCR_SERVICE_PORT=8090
echo "OCR_SERVICE_PORT is unset -- setting to default: $OCR_SERVICE_PORT"
fi
if [ -z ${OCR_SERVICE_LOG_LEVEL+x} ]; then
OCR_SERVICE_LOG_LEVEL=40
echo "OCR_SERVICE_LOG_LEVEL is unset -- setting to default: $OCR_SERVICE_LOG_LEVEL"
fi
if [ -z ${OCR_WEB_SERVICE_WORKERS+x} ]; then
OCR_WEB_SERVICE_WORKERS=1
export OCR_WEB_SERVICE_WORKERS=1
echo "OCR_WEB_SERVICE_WORKERS is unset -- setting to default: $OCR_WEB_SERVICE_WORKERS"
fi
if [ -z ${OCR_WEB_SERVICE_THREADS+x} ]; then
OCR_WEB_SERVICE_THREADS=1
export OCR_WEB_SERVICE_THREADS=1
echo "OCR_WEB_SERVICE_THREADS is unset -- setting to default: $OCR_WEB_SERVICE_THREADS"
fi
if [ -z ${OCR_SERVICE_DEBUG_MODE+x} ]; then
OCR_SERVICE_DEBUG_MODE=True
export OCR_SERVICE_DEBUG_MODE=True
echo "DEBUG_MODE is unset -- setting to default: $OCR_SERVICE_DEBUG_MODE"
fi
python3.11 -m flask run --debug --no-reload -p ${OCR_SERVICE_PORT} -h ${OCR_SERVICE_HOST}