diff --git a/Dockerfile b/Dockerfile index fca8192..61a035b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 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 @@ -18,8 +18,4 @@ RUN apt-get clean -y EXPOSE 5000 -COPY start.sh /jarvis/ - -RUN chmod +x start.sh - -CMD "./start.sh" \ No newline at end of file +CMD [ "python3", "start.py"] \ No newline at end of file diff --git a/api.py b/api.py index e8848f6..fc1df0e 100644 --- a/api.py +++ b/api.py @@ -64,7 +64,3 @@ def start_server(): app.config['JSON_AS_ASCII'] = False # TODO: add to config app.run(port=5000, debug=False, host='0.0.0.0', threaded=True) - - -if __name__ == '__main__': - start_server() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..4b217fb --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests~=2.28.1 +Flask~=2.2.2 diff --git a/start.py b/start.py new file mode 100644 index 0000000..f9f9a69 --- /dev/null +++ b/start.py @@ -0,0 +1,4 @@ +import api + +if __name__ == '__main__': + api.start_server()