Codevault initial commit

This commit is contained in:
2026-08-16 16:23:14 +03:00
commit 6ee80f1c8f
47 changed files with 3177 additions and 0 deletions

23
Dockerfile Normal file
View File

@@ -0,0 +1,23 @@
FROM golang:1.26-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o /out/codevault .
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=build /out/codevault ./codevault
# /app/data's ownership is picked up by Docker as the initial content of any
# named volume mounted there, so the "nobody" user can still write the DB file.
RUN mkdir -p /app/data && chown -R nobody:nobody /app/data
USER nobody
EXPOSE 8080
ENTRYPOINT ["./codevault"]
CMD ["run", "--config", "/app/config.yaml"]