-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice-start.sh
More file actions
executable file
·35 lines (24 loc) · 993 Bytes
/
service-start.sh
File metadata and controls
executable file
·35 lines (24 loc) · 993 Bytes
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
#!/bin/bash
set -e
# PYTHONDONTWRITEBYTECODE is an environment variable in Python that, when set to a non-empty string (commonly 1),
# prevents Python from writing .pyc files to disk when importing source modules
export PYTHONDONTWRITEBYTECODE=1
JAVA_HOME='C:\Users\euiyoung.hwang\'
PATH=$PATH:$JAVA_HOME
export JAVA_HOME
SCRIPTDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cd $SCRIPTDIR
VENV=".venv"
# Python 3.11.7 with Window
if [ -d "$VENV/bin" ]; then
source $VENV/bin/activate
else
source $VENV/Scripts/activate
fi
# -- background
# sudo netstat -nlp | grep :8002
# nohup $SCRIPTDIR/service-start.sh &> /dev/null &
# gunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8888 --workers 4
# gunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8888 --workers 4 --timemot 120
python -m uvicorn main:app --reload --host=0.0.0.0 --port=8888 --workers 1
# poetry run uvicorn main:app --reload --host=0.0.0.0 --port=8888 --workers 4