Updated Dockerfiles to use second container for bot updates #76
@ -39,7 +39,24 @@ pipeline:
|
||||
from_secret: password
|
||||
registry:
|
||||
from_secret: registry
|
||||
dockerfile: telegram_bot/Dockerfile
|
||||
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
|
||||
platforms: linux/amd64
|
||||
when:
|
||||
path: "telegram_bot/**"
|
||||
|
@ -30,6 +30,11 @@ services:
|
||||
env_file:
|
||||
- ${PWD}/.env.bot
|
||||
|
||||
aktienbot_bot_updates:
|
||||
image: registry.flokaiser.com/aktienbot/bot_updates
|
||||
env_file:
|
||||
- ${PWD}/.env.bot
|
||||
|
||||
mariadb:
|
||||
image: mariadb
|
||||
volumes:
|
||||
|
@ -10,11 +10,5 @@ RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-locati
|
||||
# Copy the source code to the working directory
|
||||
COPY telegram_bot /srv/flask_app
|
||||
|
||||
# Change file permissions
|
||||
RUN chmod +x ./deploy/start.sh
|
||||
|
||||
# TODO: Set healthcheck
|
||||
# HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]
|
||||
|
||||
# Run the application
|
||||
CMD ["./deploy/start.sh"]
|
||||
CMD ["python bot.py"]
|
14
telegram_bot/Dockerfile.updates
Normal file
14
telegram_bot/Dockerfile.updates
Normal file
@ -0,0 +1,14 @@
|
||||
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 ["python bot_updates.py"]
|
Loading…
Reference in New Issue
Block a user