apps/ui: Warp's design system for Vue 3 + Tailwind v4. Tokens, fonts, icons and logo come from the brand package, with a Tailwind theme on the tokens and Vue components on the brand component styles. apps/admin: the admin panel as a separate, optional service. warp-admin embeds the built Vue app and proxies only the login endpoints and /_warp/admin/v1 to the homeserver. Pages: dashboard, users, rooms, federation, registration and tokens, server notices, application services, audit log. Also: pnpm workspace, go.work entry, Dockerfile, an `admin` compose profile, Makefile targets, a CI job with a proxy smoke test, and docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.5 KiB
Docker
53 lines
1.5 KiB
Docker
# warp-admin — the optional admin panel, as its own container.
|
|
#
|
|
# Build from the repository root (the panel uses the shared apps/ui package):
|
|
#
|
|
# docker build -t warp-admin -f apps/admin/Dockerfile .
|
|
# docker run -p 8009:8009 -e WARP_ADMIN_HOMESERVER=http://warp:8008 warp-admin
|
|
|
|
FROM node:22-alpine AS web
|
|
|
|
WORKDIR /src
|
|
RUN corepack enable
|
|
|
|
# Lockfile and manifests first, so the package store survives source changes.
|
|
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
|
|
COPY apps/ui/package.json ./apps/ui/
|
|
COPY apps/admin/package.json ./apps/admin/
|
|
RUN pnpm install --frozen-lockfile --filter @warp/admin...
|
|
|
|
COPY apps/ui ./apps/ui
|
|
COPY apps/admin ./apps/admin
|
|
RUN pnpm --filter @warp/admin build
|
|
|
|
|
|
FROM golang:1.26-alpine AS build
|
|
|
|
WORKDIR /src/apps/admin
|
|
COPY apps/admin/go.mod ./
|
|
COPY apps/admin/cmd ./cmd
|
|
COPY apps/admin/internal ./internal
|
|
COPY --from=web /src/apps/admin/internal/panel/build/dist ./internal/panel/build/dist
|
|
|
|
ARG VERSION=0.0.0-dev
|
|
ENV CGO_ENABLED=0 GOWORK=off
|
|
RUN go build -trimpath -ldflags "-s -w -X main.version=${VERSION}" -o /out/warp-admin ./cmd/warp-admin
|
|
|
|
|
|
FROM alpine:3.21
|
|
|
|
RUN apk add --no-cache ca-certificates curl && adduser -D -u 10002 warp-admin
|
|
COPY --from=build /out/warp-admin /usr/local/bin/warp-admin
|
|
USER warp-admin
|
|
|
|
ENV WARP_ADMIN_LISTEN=":8009" \
|
|
WARP_ADMIN_HOMESERVER="http://warp:8008" \
|
|
WARP_ADMIN_LOG_FORMAT="json"
|
|
|
|
EXPOSE 8009
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD curl -fsS http://127.0.0.1:8009/healthz || exit 1
|
|
|
|
ENTRYPOINT ["warp-admin"]
|