From 56a43b2ff0ebbbef6eda54dd7d79748b4258f790 Mon Sep 17 00:00:00 2001 From: Shekhar Vaidya Date: Fri, 10 Apr 2026 20:23:59 +0530 Subject: [PATCH] feat: v3 release with Coolify support and UI polish --- backend/Dockerfile | 34 ++++++++++++++++++++++++++ frontend/src/components/SiteFooter.tsx | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 backend/Dockerfile diff --git a/backend/Dockerfile b/backend/Dockerfile new file mode 100644 index 0000000..8d3ab52 --- /dev/null +++ b/backend/Dockerfile @@ -0,0 +1,34 @@ +# ── Build stage ────────────────────────────────────────────────────────────── +FROM golang:1.22-alpine AS builder + +WORKDIR /app + +# Copy go mod files first for layer caching +COPY go.mod go.sum ./ +RUN go mod download + +# Copy source and build +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o msdl-backend main.go + +# ── Runtime stage ───────────────────────────────────────────────────────────── +FROM alpine:3.19 + +# Security: run as non-root +RUN addgroup -S app && adduser -S app -G app + +WORKDIR /app + +# Copy binary and optional static public folder +COPY --from=builder /app/msdl-backend . +COPY --from=builder /app/public ./public + +RUN chown -R app:app /app +USER app + +EXPOSE 3002 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ + CMD wget -qO- http://localhost:3002/health || exit 1 + +CMD ["./msdl-backend"] diff --git a/frontend/src/components/SiteFooter.tsx b/frontend/src/components/SiteFooter.tsx index 49c57aa..a231272 100644 --- a/frontend/src/components/SiteFooter.tsx +++ b/frontend/src/components/SiteFooter.tsx @@ -16,7 +16,7 @@ export default function SiteFooter() { About ·