# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Copy the requirements file into the container
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code into the container
COPY . .

# Ensure the .env file is present (you can add it manually or use a volume)
# Example: docker-compose run -v $(pwd)/.env:/app/.env ...

# Command to run the bot
CMD ["python", "main.py"]