Checkpoint: grpc auth fix, issuer list/detail, v2 protos, architecture docs
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
44
Dockerfile
44
Dockerfile
@@ -1,36 +1,8 @@
|
||||
FROM golang:1.23-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache gcc musl-dev
|
||||
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /metacrypt ./cmd/metacrypt
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /metacrypt-web ./cmd/metacrypt-web
|
||||
|
||||
FROM alpine:3.21
|
||||
|
||||
RUN apk add --no-cache ca-certificates tzdata \
|
||||
&& addgroup -S metacrypt \
|
||||
&& adduser -S -G metacrypt -h /srv/metacrypt -s /sbin/nologin metacrypt \
|
||||
&& mkdir -p /srv/metacrypt && chown metacrypt:metacrypt /srv/metacrypt
|
||||
|
||||
COPY --from=builder /metacrypt /usr/local/bin/metacrypt
|
||||
COPY --from=builder /metacrypt-web /usr/local/bin/metacrypt-web
|
||||
|
||||
# /srv/metacrypt is the single volume mount point.
|
||||
# It must contain:
|
||||
# metacrypt.toml — configuration file
|
||||
# certs/ — TLS certificate and key
|
||||
# metacrypt.db — created automatically on first run
|
||||
VOLUME /srv/metacrypt
|
||||
WORKDIR /srv/metacrypt
|
||||
|
||||
EXPOSE 8443
|
||||
|
||||
USER metacrypt
|
||||
|
||||
ENTRYPOINT ["metacrypt"]
|
||||
CMD ["server", "--config", "/srv/metacrypt/metacrypt.toml"]
|
||||
# This file is retained for reference only.
|
||||
# The API server and web UI are built as separate images:
|
||||
#
|
||||
# Dockerfile.api — metacrypt API server (ports 8443, 9443)
|
||||
# Dockerfile.web — metacrypt web UI (port 8080)
|
||||
#
|
||||
# Use `make docker` or `docker compose` (deploy/docker/docker-compose.yml)
|
||||
# to build both images.
|
||||
|
||||
Reference in New Issue
Block a user