22 lines
481 B
Text
22 lines
481 B
Text
|
|
# 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 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"]
|