docker stuff
This commit is contained in:
parent
94e03b95ec
commit
0e0c34fa04
@ -10,7 +10,7 @@ WORKDIR /jarvis
|
|||||||
|
|
||||||
RUN apt install python3.9 python3-pip python3.9-dev python3.9-distutils python3-fann2 libfann-dev swig git python3-levenshtein curl -y
|
RUN apt install python3.9 python3-pip python3.9-dev python3.9-distutils python3-fann2 libfann-dev swig git python3-levenshtein curl -y
|
||||||
|
|
||||||
RUN git clone --branch $(curl --silent "https://api.github.com/repos/m4th1eu/jarvis-server/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') --progress --verbose https://github.com/M4TH1EU/jarvis-server.git .
|
RUN git clone --branch $(curl --silent "https://api.github.com/repos/m4th1eu/jarvis-server-v2/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') --progress --verbose https://github.com/M4TH1EU/jarvis-server-v2.git .
|
||||||
|
|
||||||
RUN python3 -m pip install -r requirements.txt
|
RUN python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
@ -18,8 +18,4 @@ RUN apt-get clean -y
|
|||||||
|
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
|
|
||||||
COPY start.sh /jarvis/
|
CMD [ "python3", "start.py"]
|
||||||
|
|
||||||
RUN chmod +x start.sh
|
|
||||||
|
|
||||||
CMD "./start.sh"
|
|
4
api.py
4
api.py
@ -64,7 +64,3 @@ def start_server():
|
|||||||
app.config['JSON_AS_ASCII'] = False
|
app.config['JSON_AS_ASCII'] = False
|
||||||
# TODO: add to config
|
# TODO: add to config
|
||||||
app.run(port=5000, debug=False, host='0.0.0.0', threaded=True)
|
app.run(port=5000, debug=False, host='0.0.0.0', threaded=True)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
start_server()
|
|
||||||
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
requests~=2.28.1
|
||||||
|
Flask~=2.2.2
|
Loading…
Reference in New Issue
Block a user