20 lines
487 B
Docker
20 lines
487 B
Docker
# Stage 1: Build frontend
|
|
FROM node:22-alpine AS frontend
|
|
WORKDIR /app/web
|
|
COPY web/package.json web/package-lock.json ./
|
|
RUN npm ci
|
|
COPY web/ ./
|
|
RUN npm run build
|
|
|
|
# Stage 2: Runtime — server is just a static binary + frontend assets
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates
|
|
RUN mkdir -p /app/data
|
|
WORKDIR /app
|
|
COPY target/aarch64-unknown-linux-musl/release/tori .
|
|
COPY --from=frontend /app/web/dist ./web/dist/
|
|
COPY config.yaml .
|
|
|
|
EXPOSE 3000
|
|
CMD ["./tori", "server"]
|