Add admin and customer interfaces, orders, signed activation and leases, protected package delivery, keyring verification, migrations, security controls, tests and deployment documentation. Co-Authored-By: Craft Agent <agents-noreply@craft.do>
18 lines
586 B
Docker
18 lines
586 B
Docker
FROM golang:1.23-alpine AS build
|
|
WORKDIR /src
|
|
COPY backend/go.mod backend/go.sum ./
|
|
RUN go mod download
|
|
COPY backend/ ./
|
|
RUN CGO_ENABLED=0 go build -o /out/server ./cmd/server && CGO_ENABLED=0 go build -o /out/migrate ./cmd/migrate
|
|
|
|
FROM alpine:3.21
|
|
RUN apk add --no-cache ca-certificates wget && addgroup -g 10001 app && adduser -D -u 10001 -G app app
|
|
WORKDIR /app
|
|
COPY --from=build /out/ /app/
|
|
COPY backend/migrations /app/migrations
|
|
COPY deploy/entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod 0555 /app/entrypoint.sh
|
|
USER 10001:10001
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
|
CMD ["/app/server"]
|