From c66906b78f7c9b40c0c2799b91c0503315956336 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Sun, 13 Aug 2023 19:06:45 -0700 Subject: [PATCH] Add docker-compose.yml, Dockerfile, and requirements.txt Signed-off-by: Alek Ratzloff --- Dockerfile | 7 +++++++ docker-compose.yml | 11 +++++++++++ requirements.txt | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..42fcee9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11 +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY .env . +COPY chanbans ./chanbans +CMD [ "python", "-m", "chanbans", "serve" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..85453c6 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3" +services: + chanbans: + build: . + ports: + - "127.0.0.1:8080:8080" + env_file: + - .env + volumes: + - "./static:/app/static" + - "./bans.db:/app/bans.db" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6b48c5e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,32 @@ +aiohttp==3.8.5 +aiosignal==1.3.1 +astroid==2.15.6 +async-timeout==4.0.2 +attrs==23.1.0 +beautifulsoup4==4.12.2 +black==23.7.0 +charset-normalizer==3.2.0 +click==8.1.6 +dill==0.3.7 +frozenlist==1.4.0 +idna==3.4 +isort==5.12.0 +Jinja2==3.1.2 +lazy-object-proxy==1.9.0 +MarkupSafe==2.1.3 +mccabe==0.7.0 +multidict==6.0.4 +mypy==1.4.1 +mypy-extensions==1.0.0 +packaging==23.1 +pathspec==0.11.2 +platformdirs==3.10.0 +pylint==2.17.5 +python-dotenv==1.0.0 +soupsieve==2.4.1 +tomlkit==0.12.1 +types-beautifulsoup4==4.12.0.5 +types-html5lib==1.1.11.15 +typing_extensions==4.7.1 +wrapt==1.15.0 +yarl==1.9.2