add Dockerfile, update README (license, temp config, docker instructions)

This commit is contained in:
Ash B 2026-04-17 19:59:31 +00:00
parent 0099455311
commit 229a561c4b
2 changed files with 34 additions and 1 deletions

16
Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM golang:1.24-alpine AS builder
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o proxx
FROM alpine:3.21
RUN apk add --no-cache ca-certificates
COPY --from=builder /build/proxx /usr/local/bin/proxx
COPY --from=builder /build/config.yaml /etc/proxx/config.yaml
EXPOSE 8080
ENTRYPOINT ["proxx"]

View file

@ -25,6 +25,9 @@ Create a `config.yaml` file in the working directory:
port: 8080 port: 8080
upstream_url: "https://api.z.ai/api/anthropic" upstream_url: "https://api.z.ai/api/anthropic"
# Optional: override temperature for all requests
# temperature: 0.7
# Retry configuration # Retry configuration
max_retries: 3 max_retries: 3
retry_base_delay_ms: 1000 retry_base_delay_ms: 1000
@ -70,6 +73,8 @@ Provides Go toolchain with gopls and other development tools.
## Running ## Running
### Binary
```bash ```bash
./proxx ./proxx
``` ```
@ -79,6 +84,18 @@ The server will start and log:
Starting proxx on :8080, upstream: https://api.z.ai/api/anthropic Starting proxx on :8080, upstream: https://api.z.ai/api/anthropic
``` ```
### Docker
```bash
docker build -t proxx .
docker run -p 8080:8080 -v ./config.yaml:/etc/proxx/config.yaml proxx
```
The server will start and log:
```
Starting proxx on :8080, upstream: https://api.z.ai/api/anthropic
```
## API Endpoints ## API Endpoints
### GET /v1/models ### GET /v1/models
@ -230,4 +247,4 @@ proxx/
## License ## License
See LICENSE file for details. MIT