| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- FROM node:22-alpine AS frontend-builder
- WORKDIR /aiproxy/web
- COPY ./web/ ./
- RUN npm install -g pnpm
- RUN pnpm install && pnpm run build
- FROM golang:1.25.2-alpine AS builder
- WORKDIR /aiproxy/core
- COPY ./ /aiproxy
- COPY --from=frontend-builder /aiproxy/web/dist/ /aiproxy/core/public/dist/
- RUN go install github.com/swaggo/swag/cmd/swag@latest
- RUN sh scripts/swag.sh
- RUN go build -trimpath -ldflags "-s -w" -o aiproxy
- FROM alpine:latest
- RUN mkdir -p /aiproxy
- WORKDIR /aiproxy
- VOLUME /aiproxy
- RUN apk add --no-cache ca-certificates tzdata ffmpeg curl && \
- rm -rf /var/cache/apk/*
- COPY --from=builder /aiproxy/core/aiproxy /usr/local/bin/aiproxy
- ENV PUID=0 PGID=0 UMASK=022
- ENV FFMPEG_ENABLED=true
- EXPOSE 3000
- ENTRYPOINT ["aiproxy"]
|