FROM python:3.11-slim

# Install raytunnel directly from PyPI
RUN pip install --no-cache-dir raytunnel

# Expose API/WS control port, HTTP TCP proxy port, and dynamic SSH forwarding port range
EXPOSE 8000 8001 2200-2300

# Default environment variables
ENV RAYTUNNEL_TOKEN="change-me" \
    HOST="0.0.0.0" \
    PORT="8001" \
    TCP_PORT="8000" \
    DOMAIN="s.yourdomain.com"

# Command to run the server
CMD raytunnel server --host $HOST --port $PORT --tcp-port $TCP_PORT --token $RAYTUNNEL_TOKEN --domain $DOMAIN
