chore(): docker-compose

This commit is contained in:
2025-08-27 21:29:52 +02:00
parent 75dfeaffd2
commit 5552258f20
9 changed files with 89 additions and 62 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM golang:1.24 as build
WORKDIR /app
# Copy module files and download dependencies
COPY go.mod go.sum ./
RUN go mod download
# Copy the rest of the application source and build
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /invoiceapi cmd/invoiceapi/main.go
EXPOSE 8080
FROM alpine:3
# the test program:
COPY --from=build /invoiceapi /invoiceapi
# the tls certificates:
# NB: this pulls directly from the upstream image, which already has ca-certificates:
CMD [ "/invoiceapi" ]