cliproxy-api / Dockerfile.fly
godzilla865's picture
feat: Add deployment configs and API documentation
09b9584
FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION=dev
ARG COMMIT=none
ARG BUILD_DATE=unknown
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X 'main.Version=${VERSION}' -X 'main.Commit=${COMMIT}' -X 'main.BuildDate=${BUILD_DATE}'" -o ./CLIProxyAPI ./cmd/server/
FROM alpine:3.22.0
RUN apk add --no-cache tzdata ca-certificates
RUN mkdir -p /CLIProxyAPI/auth-credentials
COPY --from=builder ./app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI
# Copy production config as config.yaml
COPY config.prod.yaml /CLIProxyAPI/config.yaml
# Copy auth credentials
COPY auth-credentials/ /CLIProxyAPI/auth-credentials/
WORKDIR /CLIProxyAPI
EXPOSE 8317
ENV TZ=UTC
CMD ["./CLIProxyAPI"]