forked from frayZV/telegram-support-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 698 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Use an official Python runtime as a parent image
FROM python:3.13-slim
# Set the working directory in the container
WORKDIR /opt/bot
# Copy the requirements file into the container at /opt/bot
COPY requirements.txt .
# Create a virtual environment
RUN python -m venv /opt/bot/venv
ENV PATH="/opt/bot/venv/bin:$PATH"
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application's code into the container at /app
COPY . .
# Add a healthcheck to see if the bot is running
# HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
# CMD pgrep -f "python main.py" > /dev/null || exit 1
# Command to run the application
CMD ["python", "main.py"]