# Example Dockerfile showing how to use the new startup system
# This is a reference - not meant to replace your existing Dockerfile

FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy requirements and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Make startup scripts executable
RUN chmod +x start.sh
RUN chmod +x docker-entrypoint.sh

# Set environment variables
ENV PYTHONPATH=/app
ENV UVICORN_PORT=8000
ENV UVICORN_WORKERS=4

# Expose port
EXPOSE 8000

# Use the production entrypoint script (supports initialization)
ENTRYPOINT ["./docker-entrypoint.sh"]

# Alternative: Run initialization first, then production server
# CMD ["sh", "-c", "./start.sh init && ./start.sh prod"]

# Alternative: Use Python directly
# CMD ["python3", "main.py", "--mode", "prod"]
