Deploy sgardd to rift and add persistent remote config.
Deployment: Dockerfile + docker-compose for sgardd on rift behind mc-proxy (L4 SNI passthrough on :9443, multiplexed with metacrypt gRPC). TLS via Metacrypt-issued cert, SSH-key auth. CLI: `sgard remote set/show` saves addr, TLS, and CA path to <repo>/remote.yaml so push/pull work without flags. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
deploy/docker/Dockerfile
Normal file
30
deploy/docker/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG VERSION=dev
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /sgardd ./cmd/sgardd
|
||||
|
||||
# Runtime stage
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata \
|
||||
&& adduser -D -h /srv/sgard sgard
|
||||
|
||||
COPY --from=builder /sgardd /usr/local/bin/sgardd
|
||||
|
||||
VOLUME /srv/sgard
|
||||
EXPOSE 9473
|
||||
|
||||
USER sgard
|
||||
|
||||
ENTRYPOINT ["sgardd", \
|
||||
"--repo", "/srv/sgard", \
|
||||
"--authorized-keys", "/srv/sgard/authorized_keys", \
|
||||
"--tls-cert", "/srv/sgard/certs/sgard.pem", \
|
||||
"--tls-key", "/srv/sgard/certs/sgard.key"]
|
||||
Reference in New Issue
Block a user