File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM python:3-slim AS builder
2+
3+ COPY requirements.txt .
4+ RUN pip install --user -r requirements.txt
5+
6+ FROM python:3-slim
7+ RUN mkdir /app
8+ WORKDIR /app
9+ COPY --from=builder /root/.local /root/.local
10+ COPY ddb.py pyxie.py constfig.py config.yaml run.sh ./
11+ ENV PATH=/root/.local/bin:$PATH
12+ EXPOSE 8000
13+ # CMD ["python", "pyxie.py"]
14+ CMD ["/app/run.sh" ]
Original file line number Diff line number Diff line change 99class _C (object ):
1010 def __init__ (self ):
1111 # Default values for user configurable items
12- self .LISTEN_IP = "0 .0.0.0 "
12+ self .LISTEN_IP = "127 .0.0.1 "
1313 self .LISTEN_PORT = 5000
1414 self .API_KEYS = []
1515 self .LOG_LEVEL = "WARNING"
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def root():
5757
5858
5959def main ():
60- pyxie .run ()
60+ pyxie .run (host = C . LISTEN_IP , port = C . LISTEN_PORT )
6161
6262
6363if __name__ == "__main__" :
Original file line number Diff line number Diff line change 11pyyaml
22flask
33ua-parser
4+ gunicorn
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ -z " $LISTEN_IP " ]; then
4+ export LISTEN_IP=" 0.0.0.0"
5+ fi
6+
7+ if [ -z " $LISTEN_PORT " ]; then
8+ export LISTEN_PORT=8000
9+ fi
10+
11+ gunicorn --bind $LISTEN_IP :$LISTEN_PORT pyxie:pyxie
You can’t perform that action at this time.
0 commit comments