initital commit
This commit is contained in:
+26
@@ -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"]
|
||||
Reference in New Issue
Block a user