-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (34 loc) · 1015 Bytes
/
docker-compose.yml
File metadata and controls
35 lines (34 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# =============================================================================
# PIF Docker Compose Example
#
# Runs PIF as a reverse proxy in front of the OpenAI API.
#
# Usage:
# docker compose up -d
# curl http://localhost:8080/healthz
#
# Then point your SDK at http://localhost:8080/v1
# =============================================================================
services:
pif:
build:
context: ../../
dockerfile: deploy/docker/Dockerfile
ports:
- "8080:8080"
volumes:
- ../../rules:/etc/pif/rules:ro
- ../../config.yaml:/etc/pif/config.yaml:ro
environment:
- PIF_PROXY_TARGET=https://api.openai.com
- PIF_PROXY_LISTEN=:8080
- PIF_PROXY_ACTION=block
- PIF_DETECTOR_THRESHOLD=0.5
- PIF_LOGGING_LEVEL=info
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/healthz"]
interval: 10s
timeout: 5s
retries: 3
start_period: 5s
restart: unless-stopped