add Dockerfile, update README (license, temp config, docker instructions)
This commit is contained in:
parent
0099455311
commit
229a561c4b
2 changed files with 34 additions and 1 deletions
16
Dockerfile
Normal file
16
Dockerfile
Normal 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"]
|
||||
19
README.md
19
README.md
|
|
@ -25,6 +25,9 @@ Create a `config.yaml` file in the working directory:
|
|||
port: 8080
|
||||
upstream_url: "https://api.z.ai/api/anthropic"
|
||||
|
||||
# Optional: override temperature for all requests
|
||||
# temperature: 0.7
|
||||
|
||||
# Retry configuration
|
||||
max_retries: 3
|
||||
retry_base_delay_ms: 1000
|
||||
|
|
@ -70,6 +73,8 @@ Provides Go toolchain with gopls and other development tools.
|
|||
|
||||
## Running
|
||||
|
||||
### Binary
|
||||
|
||||
```bash
|
||||
./proxx
|
||||
```
|
||||
|
|
@ -79,6 +84,18 @@ The server will start and log:
|
|||
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
|
||||
|
||||
### GET /v1/models
|
||||
|
|
@ -230,4 +247,4 @@ proxx/
|
|||
|
||||
## License
|
||||
|
||||
See LICENSE file for details.
|
||||
MIT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue