diff --git a/.woodpecker/pipeline.yml b/.woodpecker/pipeline.yml index 8551885..7a0d6a1 100644 --- a/.woodpecker/pipeline.yml +++ b/.woodpecker/pipeline.yml @@ -39,24 +39,7 @@ pipeline: from_secret: password registry: from_secret: registry - dockerfile: telegram_bot/Dockerfile.bot - platforms: linux/amd64 - when: - path: "telegram_bot/**" - event: push - - build_bot_updates: - image: woodpeckerci/plugin-docker-buildx - settings: - repo: - from_secret: repo_bot_updates - username: - from_secret: username - password: - from_secret: password - registry: - from_secret: registry - dockerfile: telegram_bot/Dockerfile.updates + dockerfile: telegram_bot/Dockerfile platforms: linux/amd64 when: path: "telegram_bot/**" diff --git a/telegram_bot/Dockerfile.bot b/telegram_bot/Dockerfile similarity index 84% rename from telegram_bot/Dockerfile.bot rename to telegram_bot/Dockerfile index 58002cc..de4bda8 100644 --- a/telegram_bot/Dockerfile.bot +++ b/telegram_bot/Dockerfile @@ -11,4 +11,4 @@ RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-locati COPY telegram_bot /srv/flask_app # Run the application -CMD ["/usr/local/bin/python", "bot.py"] +ENTRYPOINT ["/bin/sh" "-c" "python bot.py && python bot_updates.py"] diff --git a/telegram_bot/Dockerfile.updates b/telegram_bot/Dockerfile.updates deleted file mode 100644 index 0f7e630..0000000 --- a/telegram_bot/Dockerfile.updates +++ /dev/null @@ -1,14 +0,0 @@ -FROM python:3.10-slim - -# Change the working directory to the root of the project -WORKDIR /srv/flask_app - -# Install the dependencies -COPY telegram_bot/requirements.txt /srv/flask_app/ -RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location - -# Copy the source code to the working directory -COPY telegram_bot /srv/flask_app - -# Run the application -CMD ["/usr/local/bin/python", "bot_updates.py"]