chore: add Dockerfile and Forgejo CI publish workflow: Dockerfile
This commit is contained in:
parent
2f9fd42a91
commit
8e9e4a7e59
1 changed files with 37 additions and 0 deletions
37
Dockerfile
Normal file
37
Dockerfile
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue