- db.Open: delegate to mcdsl/db.Open - db.Migrate: convert to mcdsl/db.Migration format, delegate - auth: type aliases for TokenInfo/Authenticator/Config from mcdsl, re-export error sentinels, Logout helper - cmd/server: construct auth.Authenticator from Config (not mcias.Client) - server/routes.go logout: use auth.Logout(authenticator, token) - grpcserver/auth.go: same logout pattern, fix Login return type (time.Time not string) - webserver: replace mcias.Client with mcdsl/auth for service token validation; resolveUser degrades to raw UUID (TODO: restore when mcias client library is properly tagged) - Dockerfiles: bump to golang:1.25-alpine, remove gcc/musl-dev, add VERSION build arg - Deploy: add docker-compose-rift.yml with localhost-only port mapping - Remove git.wntrmute.dev/kyle/mcias/clients/go dependency entirely - All tests pass, net -185 lines Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
932 B
Docker
36 lines
932 B
Docker
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 -X main.version=${VERSION}" -o /metacrypt ./cmd/metacrypt
|
|
|
|
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
|
|
|
|
# /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
|
|
EXPOSE 9443
|
|
|
|
USER metacrypt
|
|
|
|
ENTRYPOINT ["metacrypt"]
|
|
CMD ["server", "--config", "/srv/metacrypt/metacrypt.toml"]
|