2022-03-16 10:41:13 +01:00
|
|
|
FROM python:3.10-slim
|
2022-03-08 15:19:19 +01:00
|
|
|
|
2022-04-04 15:51:43 +02:00
|
|
|
# Change the working directory to the root of the project
|
2022-03-08 15:19:19 +01:00
|
|
|
WORKDIR /srv/flask_app
|
|
|
|
|
2022-04-04 15:51:43 +02:00
|
|
|
# Install the dependencies
|
2022-03-12 20:17:06 +01:00
|
|
|
COPY telegram_bot/requirements.txt /srv/flask_app/
|
2022-03-08 15:19:19 +01:00
|
|
|
RUN pip install -r requirements.txt --src /usr/local/src --no-warn-script-location
|
|
|
|
|
2022-04-04 15:51:43 +02:00
|
|
|
# Copy the source code to the working directory
|
2022-03-12 20:17:06 +01:00
|
|
|
COPY telegram_bot /srv/flask_app
|
2022-04-04 15:51:43 +02:00
|
|
|
|
|
|
|
# Change file permissions
|
2022-03-08 15:19:19 +01:00
|
|
|
RUN chmod +x ./deploy/start.sh
|
|
|
|
|
2022-04-04 15:51:43 +02:00
|
|
|
# TODO: Set healthcheck
|
2022-03-12 20:02:39 +01:00
|
|
|
# HEALTHCHECK --interval=15s --timeout=2s CMD ["./deploy/healthcheck.sh"]
|
2022-03-08 15:19:19 +01:00
|
|
|
|
2022-04-04 15:51:43 +02:00
|
|
|
# Run the application
|
2022-03-10 08:41:36 +01:00
|
|
|
CMD ["./deploy/start.sh"]
|