added dockerfile #1

Merged
s415366 merged 2 commits from docker into master 2021-11-21 18:05:51 +01:00
3 changed files with 20 additions and 2 deletions
Showing only changes of commit 2244d3c9f2 - Show all commits

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM python:3
ENV DOCKER_APP True
WORKDIR /app
RUN git clone https://git.wmi.amu.edu.pl/s415366/pbr-ayct-core
COPY . .
RUN chmod u+x setup_core.sh
RUN bash setup_core.sh
RUN pip3 install -r requirements.txt
EXPOSE 5000/udp
EXPOSE 5000/tcp
CMD ["python3", "app.py"]

3
app.py
View File

@ -1,12 +1,13 @@
from flask import Flask
from flask_restful import Api, Resource
import pbrAyctCore.core as core
app = Flask(__name__)
api = Api(app)
class Hello(Resource):
def get(self):
return {"data": "All You Can Tweet"}
return core.getTestString()
api.add_resource(Hello, "/hello")

5
setup_core.sh Normal file
View File

@ -0,0 +1,5 @@
cd pbr-ayct-core
pip3 install setuptools
python3 -m pip install --upgrade build
python3 -m build
pip3 install dist/pbrAyctCore-0.0.1.tar.gz