FROM python:3.11-slim

WORKDIR /app/api

# Install system dependencies
RUN apt-get update && apt-get install -y \
    wireguard-tools \
    iptables \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all application code into /app/api
COPY . .

# Create necessary directories
RUN mkdir -p /app/data /app/config

# Expose port
EXPOSE 3000

# Run the application
CMD ["python", "app.py"] 