Multiple implementations of the same back-end application. The aim is to provide quick, side-by-side comparisons of different technologies (languages, frameworks, libraries) while preserving consistent business logic across all implementations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
499 B

FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
# Download all dependencies
RUN go mod download
COPY . .
# Generate go.sum
RUN go mod tidy
# Run tests
RUN go test ./tests/unit -v && \
go test ./tests/integration -v
# Build the application
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./cmd
# Runtime stage
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/main .
EXPOSE 3000
CMD ["./main"]