Merge pull request #76 from WebEngineering2/bot

Updated Dockerfiles to use second container for bot updates
This commit is contained in:
Florian Kaiser
2022-04-25 17:08:00 +02:00
committed by GitHub
4 changed files with 38 additions and 8 deletions

View File

@@ -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"]

View 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"]