FROM python:3.11-slim

WORKDIR /app

# Install dependencies
RUN pip install fastapi uvicorn pytz

# Copy logger and app
COPY ucbl_logger/ ./ucbl_logger/
COPY minimal_health_app.py .

# Expose port
EXPOSE 8080

# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD curl -f http://localhost:8080/health || exit 1

# Run app
CMD ["python", "minimal_health_app.py"]