22 lines
No EOL
485 B
Docker
22 lines
No EOL
485 B
Docker
# Use Python base image
|
|
FROM python:3.11.9-slim
|
|
|
|
# Set working directory inside container
|
|
WORKDIR /app
|
|
|
|
# Copy requirements first (from host into /app inside container)
|
|
COPY src/requirements.txt .
|
|
|
|
# Install dependencies
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy all app source code
|
|
COPY src/ ./src
|
|
COPY src/settings.yml .
|
|
COPY .env .
|
|
|
|
# Set environment variable so your app can find your src/ module
|
|
ENV PYTHONPATH=/app/src
|
|
|
|
# Run the bot
|
|
CMD ["python", "src/bot.py"] |