# Use a lightweight Python base image
FROM python:3.10-slim

# Set working directory inside container
WORKDIR /app

# Copy dependency file first (for caching)
COPY requirements.txt .

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

# Copy the rest of your application code
COPY . .

# Set environment variables (you can override these when running the container)
ENV REDDIT_CLIENT_ID= \
    REDDIT_CLIENT_SECRET= \
    PORT=8000

# Expose the port your app runs on
EXPOSE ${PORT}

# Command to run your Python app (update as needed)
# For example, if you have an app.py file:
CMD ["python", "app.py"]
