-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.web
More file actions
35 lines (24 loc) · 995 Bytes
/
Copy pathDockerfile.web
File metadata and controls
35 lines (24 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# syntax=docker/dockerfile:1.7
ARG BUNNYLAND_WEB_IMAGE=ghcr.io/thalismind/bunnyland-web@sha256:a7758608a1e5d77a60c0f34f2a4334ab6e0ed735705fe6f5afa658630d2b0f97
FROM node:22-bookworm-slim AS build
WORKDIR /app/web
COPY web/package.json web/package-lock.json ./
RUN npm ci
COPY web/index.html web/admin.html web/player.html web/vite.config.ts web/tsconfig.json ./
COPY web/src ./src
COPY web/public ./public
COPY web/scripts ./scripts
ENV BUNNYLAND_3D_BASE=/3d/
RUN npm run build
FROM build AS test
COPY web/test ./test
RUN mkdir -p /reports
CMD ["node", "--test", "--test-reporter=junit", "--test-reporter-destination=/reports/web.xml"]
FROM mcr.microsoft.com/playwright/python:v1.56.0-noble AS browser-test
WORKDIR /app/web
RUN python -m pip install --no-cache-dir playwright==1.56.0
COPY --from=build /app/web/dist ./dist
COPY web/scripts ./scripts
CMD ["./scripts/playwright-world-3d"]
FROM ${BUNNYLAND_WEB_IMAGE} AS runtime
COPY --from=build /app/web/dist /usr/share/nginx/html/3d