penyesuaian flow cicid

This commit is contained in:
M1 AIR
2026-01-09 10:58:11 +07:00
parent cad91957b3
commit f8aee4be7b
3 changed files with 137 additions and 56 deletions
+8 -5
View File
@@ -11,25 +11,28 @@ RUN go mod download
COPY . .
# Build binary dari cmd/api
# Build API binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o lti-api ./cmd/api
# Build SEED binary (pastikan cmd/seed ada)
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o lti-seed ./cmd/seed
# =========================
# Runtime stage
# =========================
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata curl \
RUN apk add --no-cache ca-certificates tzdata curl bash postgresql-client \
&& adduser -D -H -u 10001 appuser
WORKDIR /app
COPY --from=builder /app/lti-api /app/lti-api
COPY --from=builder /app/lti-seed /app/lti-seed
USER appuser
# Samakan dengan APP_PORT default kamu (8081)
EXPOSE 8081
CMD ["/app/lti-api"]
CMD ["/app/lti-api"]