Initial commit — energy dashboard frontend (TimescaleDB + Vue/Chart.js)

This commit is contained in:
2026-04-18 11:14:12 +02:00
commit 9fa7d36610
28 changed files with 3243 additions and 0 deletions

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
# Stage 1: Build frontend
FROM node:22-alpine AS frontend
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install
COPY frontend/ ./
RUN npm run build
# Stage 2: Build Go binary
FROM golang:1.24-alpine AS backend
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=frontend /app/dist ./dist
RUN CGO_ENABLED=0 go build -o energy-frontend .
# Stage 3: Minimal runtime
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=backend /app/energy-frontend .
EXPOSE 8080
USER nobody:nobody
ENTRYPOINT ["./energy-frontend"]