Refactor project structure: modularized code into pkg and cmd directories, added unit tests, improved CI/CD pipeline, and enhanced documentation.

This commit is contained in:
2026-02-23 17:17:01 +01:00
parent 2077d4132b
commit 9432bf6758
9 changed files with 260 additions and 25 deletions

View File

@@ -1,11 +1,15 @@
# syntax=docker/dockerfile:1
FROM golang:1.26-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o app
COPY go.mod .
FROM alpine:latest
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -o server ./cmd/diunwebhook/main.go
FROM alpine:3.18
WORKDIR /app
COPY --from=builder /app/app .
COPY --from=builder /app/server ./server
COPY static ./static
EXPOSE 8080
CMD ["./app"]
CMD ["./server"]