diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..538ff3b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# syntax=docker/dockerfile:1 +# Builds the Wild Dragon Restreamer UI: +# 1. Clone upstream datarhei/restreamer-ui at UPSTREAM_TAG +# 2. Apply overlay (branding + WebRTC components) +# 3. yarn build +# 4. Serve with Caddy + +ARG UPSTREAM_TAG=v1.14.0 +ARG NODE_VERSION=20 + +# ── Build ───────────────────────────────────────────────────────────────────── +FROM node:${NODE_VERSION}-alpine AS ui-builder + +ARG UPSTREAM_TAG + +RUN apk add --no-cache git + +RUN git clone --depth 1 --branch ${UPSTREAM_TAG} \ + https://github.com/datarhei/restreamer-ui.git /ui + +WORKDIR /ui +RUN yarn install --frozen-lockfile + +COPY overlay/ /overlay/ +COPY apply-overlay.sh /apply-overlay.sh +RUN sh /apply-overlay.sh + +ENV PUBLIC_URL=./ +RUN yarn build + +# ── Serve ───────────────────────────────────────────────────────────────────── +FROM caddy:2-alpine + +COPY --from=ui-builder /ui/build/ /srv/ +COPY Caddyfile /etc/caddy/Caddyfile + +EXPOSE 3000