diff --git a/cmd/audit-service/Dockerfile b/cmd/audit-service/Dockerfile new file mode 100644 index 0000000..4b70cf3 --- /dev/null +++ b/cmd/audit-service/Dockerfile @@ -0,0 +1,36 @@ +# Build stage +FROM golang:1.25-alpine AS builder + +WORKDIR /build + +# Install build dependencies +RUN apk add --no-cache git make + +# Copy go mod files +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source code +COPY . . + +# Build the service +WORKDIR /build/cmd/audit-service +RUN CGO_ENABLED=0 GOOS=linux go build -o audit-service -a -installsuffix cgo . + +# Runtime stage +FROM alpine:latest + +RUN apk --no-cache add ca-certificates tzdata + +WORKDIR /app + +# Copy binary from builder +COPY --from=builder /build/cmd/audit-service/audit-service . + +# Copy config files +COPY --from=builder /build/config ./config + +EXPOSE 8084 + +CMD ["./audit-service"] + diff --git a/cmd/auth-service/Dockerfile b/cmd/auth-service/Dockerfile new file mode 100644 index 0000000..cbd88ee --- /dev/null +++ b/cmd/auth-service/Dockerfile @@ -0,0 +1,36 @@ +# Build stage +FROM golang:1.25-alpine AS builder + +WORKDIR /build + +# Install build dependencies +RUN apk add --no-cache git make + +# Copy go mod files +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source code +COPY . . + +# Build the service +WORKDIR /build/cmd/auth-service +RUN CGO_ENABLED=0 GOOS=linux go build -o auth-service -a -installsuffix cgo . + +# Runtime stage +FROM alpine:latest + +RUN apk --no-cache add ca-certificates tzdata + +WORKDIR /app + +# Copy binary from builder +COPY --from=builder /build/cmd/auth-service/auth-service . + +# Copy config files +COPY --from=builder /build/config ./config + +EXPOSE 8081 + +CMD ["./auth-service"] + diff --git a/cmd/authz-service/Dockerfile b/cmd/authz-service/Dockerfile new file mode 100644 index 0000000..c4fd31e --- /dev/null +++ b/cmd/authz-service/Dockerfile @@ -0,0 +1,36 @@ +# Build stage +FROM golang:1.25-alpine AS builder + +WORKDIR /build + +# Install build dependencies +RUN apk add --no-cache git make + +# Copy go mod files +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source code +COPY . . + +# Build the service +WORKDIR /build/cmd/authz-service +RUN CGO_ENABLED=0 GOOS=linux go build -o authz-service -a -installsuffix cgo . + +# Runtime stage +FROM alpine:latest + +RUN apk --no-cache add ca-certificates tzdata + +WORKDIR /app + +# Copy binary from builder +COPY --from=builder /build/cmd/authz-service/authz-service . + +# Copy config files +COPY --from=builder /build/config ./config + +EXPOSE 8083 + +CMD ["./authz-service"] + diff --git a/cmd/identity-service/Dockerfile b/cmd/identity-service/Dockerfile new file mode 100644 index 0000000..d20998a --- /dev/null +++ b/cmd/identity-service/Dockerfile @@ -0,0 +1,36 @@ +# Build stage +FROM golang:1.25-alpine AS builder + +WORKDIR /build + +# Install build dependencies +RUN apk add --no-cache git make + +# Copy go mod files +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source code +COPY . . + +# Build the service +WORKDIR /build/cmd/identity-service +RUN CGO_ENABLED=0 GOOS=linux go build -o identity-service -a -installsuffix cgo . + +# Runtime stage +FROM alpine:latest + +RUN apk --no-cache add ca-certificates tzdata + +WORKDIR /app + +# Copy binary from builder +COPY --from=builder /build/cmd/identity-service/identity-service . + +# Copy config files +COPY --from=builder /build/config ./config + +EXPOSE 8082 + +CMD ["./identity-service"] +