From 1e147033af4eecd7f9ecb5efb717c22c6f46cfa5 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Mon, 12 Dec 2022 21:27:34 +0100 Subject: [PATCH] Dockerfile and docker-compose.yml --- .gitignore | 1 + Dockerfile | 11 +++++++++++ docker-compose.yml | 11 +++++++++++ 3 files changed, 23 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/.gitignore b/.gitignore index cfbb80a..4414109 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.idea/ /venv/ +/data/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..942aeb4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.10 + +WORKDIR /app +COPY . /app +RUN pip install -r requirements.txt + +ENV PYTHONPATH=/app/src + +EXPOSE 5000 +ENTRYPOINT [ "python3" ] +CMD [ "src/mastodon_toot_follower/server/waitress_server.py" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b3357ec --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3.9' +services: + mtf: + build: . + container_name: mtf + ports: + - '5000:5000' + volumes: + - ./data:/root/.MastodonTootFollower +# command: [ "src/mastodon_toot_follower/server/flask_server.py" ] + command: [ "src/mastodon_toot_follower/server/waitress_server.py" ]