1efd10f81f
- Go backend (single binary) with embedded Svelte frontend - JSON-per-game storage (no database) - .jsdos bundle creation on upload - Dark phosphor-green theme (#33FF33) - js-dos v8 emulator integration - Sockdrive support for games >80MB - IGDB placeholder for future artwork scraping - Docker deployment ready
29 lines
1020 B
Docker
29 lines
1020 B
Docker
# Dostalgia — Dockerized DOS game hub
|
|
|
|
# ─── Build frontend ───────────────────────────────
|
|
FROM node:20-alpine AS frontend-builder
|
|
WORKDIR /src
|
|
COPY frontend/package.json frontend/package-lock.json* ./
|
|
RUN npm ci 2>/dev/null || npm install
|
|
COPY frontend/ ./
|
|
RUN npm run build
|
|
|
|
# ─── Build Go binary ─────────────────────────────
|
|
FROM golang:1.23-alpine AS go-builder
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download 2>/dev/null || true
|
|
COPY *.go ./
|
|
COPY --from=frontend-builder /src/dist ./frontend/dist/
|
|
RUN CGO_ENABLED=0 go build -o /dostalgia .
|
|
|
|
# ─── Runtime ─────────────────────────────────────
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
COPY --from=go-builder /dostalgia /dostalgia
|
|
VOLUME /data
|
|
EXPOSE 8765
|
|
ENV DOSTALGIA_DATA=/data
|
|
ENV PORT=8765
|
|
ENTRYPOINT ["/dostalgia"]
|