Files
light-heart-labs--dreamserver/ods/extensions/services/dashboard-api/Dockerfile
T
wehub-resource-sync 9e8f1bbeed
Dashboard / frontend (push) Failing after 0s
Dashboard / api (push) Failing after 0s
Lint PowerShell / powershell-lint (ubuntu-latest) (push) Failing after 1s
Python Lint / Lint Python with Ruff (push) Failing after 1s
ShellCheck / Lint shell scripts (push) Failing after 1s
Matrix Smoke / linux-smoke (push) Failing after 1s
Matrix Smoke / distro: cachyos (push) Failing after 15s
Matrix Smoke / distro: linux-mint-21.3 (push) Failing after 15s
Matrix Smoke / distro: debian-12 (push) Failing after 5m21s
Matrix Smoke / distro: fedora-41 (push) Failing after 4m56s
Matrix Smoke / distro: ubuntu-24.04 (push) Failing after 2m13s
Matrix Smoke / distro: rocky-9 (push) Failing after 10m39s
Matrix Smoke / distro: manjaro (push) Failing after 12m11s
Matrix Smoke / distro: opensuse-tw (push) Failing after 11m53s
Matrix Smoke / distro: archlinux (push) Failing after 20m3s
Matrix Smoke / distro: ubuntu-22.04 (push) Failing after 13m49s
Validate .env Schema / tier-1-env-validation (push) Successful in 52s
Validate .env Schema / tier-2-env-validation (push) Successful in 44s
Validate .env Schema / tier-3-env-validation (push) Successful in 52s
Validate .env Schema / tier-4-env-validation (push) Successful in 51s
Validate Extensions Catalog / Check catalog is up-to-date (push) Failing after 9m47s
Secret Scan / Scan for secrets (push) Failing after 21m4s
Validate Docker Compose / Validate Docker Compose files (push) Has been cancelled
Python Type Check / Type check with mypy (push) Has been cancelled
Validate .env Schema / tier-0-env-validation (push) Has been cancelled
Test Linux / integration-smoke (push) Has been cancelled
Lint PowerShell / powershell-lint (windows-latest) (push) Has been cancelled
Matrix Smoke / macos-smoke (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:33 +08:00

47 lines
1.4 KiB
Docker

# ODS Dashboard API
# Lightweight system status backend for the Dashboard UI
FROM python:3.11-slim
LABEL org.opencontainers.image.source="https://github.com/Light-Heart-Labs/ODS"
LABEL org.opencontainers.image.description="ODS Dashboard API"
WORKDIR /app
# Install system deps for GPU metrics access
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application
# Use glob to pick up every top-level .py file. The old explicit list
# went stale every time a new module landed in main.py's imports —
# `session_signer.py` was missed once (see #1181), then `settings.py`
# again right after. The glob is bounded to the build context's top
# level (won't recurse into routers/, tests/, etc.) and matches the
# filesystem shape (one flat module dir per service).
COPY *.py ./
COPY routers/ routers/
# Non-root user
RUN useradd -m -u 1000 odser
# B1 fix: Create /data directory and make it writable for API key generation
RUN mkdir -p /data && chown odser:odser /data
USER odser
ENV DASHBOARD_API_PORT=3002
# Health check
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${DASHBOARD_API_PORT}/health || exit 1
EXPOSE ${DASHBOARD_API_PORT}
CMD uvicorn main:app --host 0.0.0.0 --port ${DASHBOARD_API_PORT}