Add full shop application: Go backend, PostgreSQL, Docker, Caddy and admin panel.

This commit is contained in:
shop
2026-06-25 16:39:33 +03:00
parent a150e4f8c6
commit ee5688f722
24 changed files with 1797 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# Build stage
FROM golang:1.23-alpine AS builder
WORKDIR /app
RUN apk add --no-cache ca-certificates git
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /shop ./cmd/shop
# Runtime stage
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /shop /app/shop
EXPOSE 8080
USER nobody
ENTRYPOINT ["/app/shop"]