initital commit

This commit is contained in:
2026-05-05 08:44:55 +00:00
commit a1922f5be1
22 changed files with 2922 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
FROM golang:1.21-alpine AS builder
RUN apk add --no-cache gcc musl-dev sqlite-dev
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -o licensevault ./cmd/server
# ---- Runtime ----
FROM alpine:3.19
RUN apk add --no-cache sqlite-libs ca-certificates
WORKDIR /app
COPY --from=builder /app/licensevault .
COPY templates/ templates/
ENV PORT=8080
ENV DB_PATH=/data/licenses.db
VOLUME ["/data"]
EXPOSE 8080
CMD ["./licensevault"]