3690c5028e
Add internal/assets package that manages app assets (logos, screenshots)
on Hub PVC with automatic seeding from baked-in image copy on first run.
Two new API endpoints: GET /assets/manifest (JSON with SHA-256 checksums)
and GET /assets/file/{name} for controllers to sync assets.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
701 B
Docker
34 lines
701 B
Docker
FROM golang:1.24-alpine AS builder
|
|
|
|
ARG VERSION=dev
|
|
ARG BUILD_TIME=unknown
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum* ./
|
|
RUN go mod download || true
|
|
|
|
COPY . .
|
|
|
|
RUN go mod tidy && \
|
|
CGO_ENABLED=0 go build \
|
|
-ldflags "-s -w -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" \
|
|
-o /felhom-hub ./cmd/hub/
|
|
|
|
FROM alpine:3.21
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata
|
|
|
|
COPY --from=builder /felhom-hub /usr/local/bin/felhom-hub
|
|
|
|
RUN mkdir -p /data /etc/felhom-hub
|
|
|
|
# Seed assets: baked into image, copied to PVC on first run
|
|
COPY assets/ /usr/share/felhom/assets-seed/
|
|
|
|
ENV TZ=Europe/Budapest
|
|
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/usr/local/bin/felhom-hub"]
|
|
CMD ["-config", "/etc/felhom-hub/hub.yaml"] |