feat: adding background jobs, Dockerfile

This commit is contained in:
allanice001
2025-11-04 16:32:54 +00:00
parent 2170b9a945
commit 19d5cf7aab
34 changed files with 1269 additions and 148 deletions

38
Dockerfile Normal file
View File

@@ -0,0 +1,38 @@
#################################
# Builder: Go + Node in one
#################################
FROM golang:1.25.3-alpine AS builder
RUN apk add --no-cache \
git ca-certificates tzdata \
build-base \
nodejs npm
RUN npm i -g yarn pnpm
WORKDIR /src
WORKDIR /src
COPY . .
RUN make clean && make swagger && make -j3 sdk-all && make ui && make build
#################################
# Runtime
#################################
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
RUN apk add --no-cache ca-certificates tzdata postgresql17-client \
&& addgroup -S app && adduser -S app -G app
WORKDIR /app
COPY --from=builder /src/autoglue /app/autoglue
ENV PORT=8080
EXPOSE 8080
USER app
HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=3 \
CMD wget -qO- "http://127.0.0.1:${PORT}/api/v1/healthz" || exit 1
ENTRYPOINT ["/app/autoglue"]