From cb9e7a626b61b10712faeeaa3fee74f3db9ceddc Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Wed, 8 Feb 2023 11:05:16 +0700 Subject: [PATCH] docker and docker compose --- .dockerignore | 3 ++- Dockerfile | 7 ++++--- docker-compose.yml | 7 +++++++ entrypoint.sh | 2 ++ requirements.txt | 6 +++--- 5 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 docker-compose.yml create mode 100755 entrypoint.sh diff --git a/.dockerignore b/.dockerignore index c31a48e..7485556 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ .dockerignore Dockerfile .gitignore -.idea \ No newline at end of file +.idea +database.sqlite \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 62943f0..543d48a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,9 @@ RUN apk add --no-cache tesseract-ocr python3 py3-numpy && \ RUN pip3 install -r requirements.txt --no-cache-dir +COPY entrypoint.sh /app +RUN chmod +x /app/entrypoint.sh + COPY . /app -ENTRYPOINT ["python3"] - -CMD ["main.py"] \ No newline at end of file +ENTRYPOINT ["/app/entrypoint.sh"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c3de12f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.11" + +services: + bot: + build: . + command: python main.py + restart: always \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..2b1bb54 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec "$@" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 11ebce9..3f6906e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,11 +5,11 @@ cycler==0.11.0 fonttools==4.37.4 idna==3.4 kiwisolver==1.4.4 -matplotlib==3.6.1 -numpy==1.23.4 +# matplotlib==3.6.1 +# numpy==1.23.4 packaging==21.3 peewee==3.15.3 -Pillow==9.2.0 +# Pillow==9.2.0 pyparsing==3.0.9 pyTelegramBotAPI==4.7.0 python-dateutil==2.8.2