-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 1.59 KB
/
Copy pathDockerfile
File metadata and controls
40 lines (32 loc) · 1.59 KB
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
36
37
38
39
40
# ── Stage 1: Build frontend ────────────────────────────────────────────────
FROM node:20-alpine AS frontend
WORKDIR /build
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci --silent
COPY frontend/ ./
RUN npm run build
# ── Stage 2: Build Go binary ───────────────────────────────────────────────
FROM golang:1.21-alpine AS go-build
WORKDIR /build
COPY api/ ./
RUN CGO_ENABLED=0 go build \
-ldflags="-s -w" \
-o /Macroverse42 .
# ── Stage 3: Runtime image ─────────────────────────────────────────────────
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
# Binary + UI
COPY --from=go-build /Macroverse42 ./Macroverse42
COPY --from=frontend /build/dist/ ./frontend-build/
# Required config and splash
COPY shader-preview-settings.default.json ./shader-preview-settings.json
COPY ascii.art ./ascii.art
# Public cloud library: starter-pack + VJ-Sorted-Production ISF tree (no resolume/)
COPY shaders/ ./shaders/
# Empty index — boot auto-scan populates SQLite from files on disk
RUN printf '[]' > shader-index.json
# Baked gallery thumbnails (generated by scripts/bake-thumbnails-offline.mjs)
COPY thumbnails-baked.json ./thumbnails.json
EXPOSE 8765
CMD ["./Macroverse42"]