* feat(x64): add Linux amd64 builds, deploy scripts and regression tests * docs(x64): update release, operations and architecture references * docs(x64): add migration, cutover and rollback runbook * ci(x64): verify Docker runtime and protect container build context
24 lines
1.0 KiB
Docker
24 lines
1.0 KiB
Docker
# Build complete Go portal for Linux x64; does not depend on the builder CPU.
|
|
FROM --platform=$BUILDPLATFORM golang:1.24.4-bookworm AS build
|
|
WORKDIR /src
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOAMD64=v1 \
|
|
go build -trimpath -ldflags="-s -w" -o /out/landwelle-portal .
|
|
|
|
# psql and ffmpeg are required at runtime by the current application.
|
|
FROM debian:bookworm-slim
|
|
RUN apt-get update && \
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
ca-certificates tzdata postgresql-client ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
useradd --system --uid 10001 --home-dir /var/lib/landwelle --shell /usr/sbin/nologin landwelle && \
|
|
install -d -o landwelle -g landwelle -m 0750 /var/lib/landwelle
|
|
COPY --from=build /out/landwelle-portal /usr/local/bin/landwelle-portal
|
|
ENV ADDR=:2200 LANDWELLE_STATE_DIR=/var/lib/landwelle
|
|
USER landwelle
|
|
VOLUME ["/var/lib/landwelle"]
|
|
EXPOSE 2200
|
|
ENTRYPOINT ["/usr/local/bin/landwelle-portal"]
|