Initial commit: breakpilot-compliance - Compliance SDK Platform
Services: Admin-Compliance, Backend-Compliance, AI-Compliance-SDK, Consent-SDK, Developer-Portal, PCA-Platform, DSMS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
41
pca-platform/heuristic-service/Dockerfile
Normal file
41
pca-platform/heuristic-service/Dockerfile
Normal file
@@ -0,0 +1,41 @@
|
||||
# Build stage
|
||||
FROM golang:1.21-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Copy go mod files
|
||||
COPY go.mod ./
|
||||
|
||||
# Initialize module and download dependencies
|
||||
RUN go mod tidy || true
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Build the binary
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /heuristic-service ./cmd/server
|
||||
|
||||
# Runtime stage
|
||||
FROM alpine:3.19
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install ca-certificates for HTTPS
|
||||
RUN apk add --no-cache ca-certificates wget
|
||||
|
||||
# Copy binary from builder
|
||||
COPY --from=builder /heuristic-service /app/heuristic-service
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8085
|
||||
|
||||
# Set environment variables
|
||||
ENV PORT=8085
|
||||
ENV GIN_MODE=release
|
||||
ENV CONFIG_PATH=/app/ai-access.json
|
||||
|
||||
# Run the service
|
||||
CMD ["/app/heuristic-service"]
|
||||
Reference in New Issue
Block a user