From 4e3c9ec28ad65a6caedd974a2308ad62f00ca9ba Mon Sep 17 00:00:00 2001 From: sergey Date: Thu, 26 Sep 2024 21:19:51 +0300 Subject: [PATCH] add docker --- .gitea/workflows/publish.yml | 13 ++----------- Dockerfile | 5 +++++ 2 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 Dockerfile diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml index 205e5ea..dbf1038 100644 --- a/.gitea/workflows/publish.yml +++ b/.gitea/workflows/publish.yml @@ -16,20 +16,11 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 - - - - - name: Print secret and variables - run: | - echo "TGBOT_CONFIG__TG__TOKEN: ${{ secrets.TGBOT_CONFIG__TG__TOKEN }}" - echo "TGBOT_CONFIG__ZBX__TOKEN: ${{ secrets.TGBOT_CONFIG__ZBX__TOKEN }}" - echo "TGBOT_CONFIG__ZBX__URL: ${{ secrets.TGBOT_CONFIG__ZBX__URL }}" - echo "qwe: ${{ vars.QWE }}" - - name: pip uprade + - name: pip upgrade run: python -m pip install --upgrade pip - name: install requirements run: pip install -r requirements.txt - - name: start + - name: start bot env: TGBOT_CONFIG__TG__TOKEN: ${{ secrets.TGBOT_CONFIG__TG__TOKEN }} TGBOT_CONFIG__ZBX__TOKEN: ${{ secrets.TGBOT_CONFIG__ZBX__TOKEN }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..29b5115 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3.12 +ADD tg-bot-app ./tg-bot-app +ADD requirements.txt /requirements.txt +RUN pip install -r requirements.txt --root-user-action=ignore +CMD ["python", "tg-bot-app/main.py"] \ No newline at end of file