Some checks failed
ci/woodpecker/tag/build/5 Pipeline failed
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/deploy/2 unknown status
ci/woodpecker/tag/deploy/1 unknown status
ci/woodpecker/tag/build/2 Pipeline failed
ci/woodpecker/tag/deploy/4 unknown status
ci/woodpecker/tag/deploy/3 unknown status
ci/woodpecker/tag/build/3 Pipeline failed
ci/woodpecker/tag/deploy/5 unknown status
ci/woodpecker/tag/ingress unknown status
ci/woodpecker/tag/build/1 Pipeline failed
ci/woodpecker/tag/build/4 Pipeline failed
42 lines
1.1 KiB
Docker
42 lines
1.1 KiB
Docker
# 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"]
|