diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..eec30bb20ef08015d116a913317c189d79738835 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.10 + +RUN useradd -m app +WORKDIR /home/app +COPY requirements.txt requirements.txt +RUN pip install -r requirements.txt + +COPY app.py qgram.py /home/app/ +COPY examples/titles.json /home/app/examples/ +RUN chown -R root:app /home/app +RUN chmod -R u=rX,g=rX,o=- /home/app +USER app:app + +ENTRYPOINT ["gunicorn", "-w", "4", "-b", "0.0.0.0", "app:app"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..67cdbd739a168d7bcff16a10a762e71177b974a7 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +TAG=0.1.0 + +build: + DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t gitlab.sauerburger.com:5049/frank/wakefield-movie-recommender:$(TAG) . + +push: build + DOCKER_DEFAULT_PLATFORM=linux/amd64 docker push gitlab.sauerburger.com:5049/frank/wakefield-movie-recommender:$(TAG) diff --git a/requirements.txt b/requirements.txt index 52b3b9229be8650b39be951a1eca8d0a83aa6dfe..4861601f778788fa2bbcf2a92190d596d67c71f7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ flask~=2.1.2 +gunicorn~=20.1.0