Files
pruefwerk/Dockerfile.dashboard
T
Sharang ParnerkarandClaude Opus 5.5 6aa91d07bf
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m55s
feat(dashboard): German by default, English switchable (#336)
The pilot customer works in German; the dashboard was English only.

- i18n module: every UI string is a `Text { de, en }` constant, so a
  missing translation is a compile error and both versions are reviewed
  side by side. German is the default; the choice is kept in the browser
  and applied after hydration, and `<html lang>` follows it.
- Language toggle in the sidebar footer, next to the theme toggle.
- Translated: sidebar, theme toggle, overview. The other pages follow as
  they are reworked for the pilot.
- Sidebar: runtime-only items in a source-only deployment are no longer
  links; Impressum and Datenschutz point at breakpilot.com (build args
  IMPRINT_URL / PRIVACY_URL) instead of dashboard routes that did not
  exist; the header says Prüfwerk.
- Overview: an empty tenant gets a call to add its first target; the AI
  chat and MCP cards are not shown in a source-only deployment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 15:37:41 +02:00

46 lines
1.7 KiB
Docker

FROM rust:1.94-bookworm AS builder
RUN cargo install dioxus-cli --version 0.7.3 --locked
ARG DOCS_URL=/docs
# Legal pages linked from the sidebar; the defaults are breakpilot.com's.
ARG IMPRINT_URL=https://breakpilot.com/impressum
ARG PRIVACY_URL=https://breakpilot.com/datenschutz
WORKDIR /app
COPY . .
ENV DOCS_URL=${DOCS_URL} \
IMPRINT_URL=${IMPRINT_URL} \
PRIVACY_URL=${PRIVACY_URL}
# compliance-agent (a workspace member) depends on the private firmwerk git
# repo, so the workspace resolve needs it even to build the dashboard.
# Authenticate the fetch with a PAT passed as a BuildKit secret.
RUN --mount=type=secret,id=git_token \
if [ -s /run/secrets/git_token ]; then \
git config --global \
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
"ssh://git@git.breakpilot.com:22222/"; \
fi && \
CARGO_NET_GIT_FETCH_WITH_CLI=true dx build --release --package compliance-dashboard
FROM debian:bookworm-slim
# curl only serves the healthcheck.
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates libssl3 curl \
&& rm -rf /var/lib/apt/lists/* \
&& useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app
WORKDIR /app
COPY --from=builder /app/target/dx/compliance-dashboard/release/web/compliance-dashboard /app/compliance-dashboard
COPY --from=builder /app/target/dx/compliance-dashboard/release/web/public /app/public
ENV IP=0.0.0.0
# Sessions live in Mongo, so the dashboard writes nothing to its filesystem.
USER app
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD curl -fsS "http://127.0.0.1:${PORT:-8080}/health" || exit 1
ENTRYPOINT ["./compliance-dashboard"]