# UI Service Dockerfile (Application only, without static files) FROM python:3.14-alpine ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ UI_PORT=8002 \ API_BASE=http://api:8001 \ BASE_PATH="" \ STATIC_BASE=http://static:8080 RUN addgroup -g 10001 -S app && \ adduser -u 10001 -S app -G app WORKDIR /app RUN apk add --no-cache \ curl \ gcc \ musl-dev \ linux-headers COPY apps/ui/requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r requirements.txt # Copy only Python code and templates, but exclude static assets COPY apps/__init__.py /app/apps/__init__.py COPY apps/ui/__init__.py /app/apps/ui/__init__.py COPY apps/ui/main.py /app/apps/ui/main.py COPY apps/ui/api_client.py /app/apps/ui/api_client.py COPY apps/ui/templates/ /app/apps/ui/templates/ RUN chown -R app:app /app USER app HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ CMD curl -f http://localhost:${UI_PORT}/health || exit 1 EXPOSE 8002 CMD ["python", "-m", "uvicorn", "apps.ui.main:app", "--host", "0.0.0.0", "--port", "8002"]