# Multi-arch release Dockerfile — uses pre-built binaries from CI
# Used by the release workflow; for local builds use the standard Dockerfile
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659

RUN apk add --no-cache ca-certificates curl postgresql16-client && \
    addgroup -S proxy && adduser -S proxy -G proxy

ARG TARGETPLATFORM
COPY build/${TARGETPLATFORM}/ccag-server /usr/local/bin/ccag-server

USER proxy
EXPOSE 8080
ENV PROXY_HOST=0.0.0.0
ENV PROXY_PORT=8080
CMD ["ccag-server"]
