-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (68 loc) · 1.67 KB
/
docker-compose.yml
File metadata and controls
75 lines (68 loc) · 1.67 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: "3.9"
services:
db:
image: postgres:15
environment:
POSTGRES_DB: aiguardrails
POSTGRES_USER: app
POSTGRES_PASSWORD: app
volumes:
- db_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: ./backend
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
environment:
DATABASE_URL: postgres://app:app@db:5432/aiguardrails?sslmode=disable
REDIS_URL: redis://redis:6379
ADMIN_TOKEN: changeme-admin
OIDC_ISSUER: http://localhost/issuer
OIDC_AUDIENCE: aiguardrails
OIDC_JWKS_URL: http://localhost/jwks
OIDC_ADMIN_ROLE: tenant_admin
OIDC_USER_ROLE: tenant_user
QWEN_API_BASE: https://dashscope.aliyuncs.com/api/v1/services/aigc/text-moderation
QWEN_API_TOKEN: ""
QWEN_MODEL: qwen-moderation
OUTPUT_MODE: mark
ports:
- "8080:8080"
frontend:
build:
context: ./frontend
args:
VITE_API_BASE: http://api:8080
VITE_ADMIN_TOKEN: changeme-admin
depends_on:
- api
ports:
- "8081:80"
proxy:
image: nginx:1.25-alpine
depends_on:
api:
condition: service_started
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro
- ./proxy/certs:/etc/nginx/certs:ro
ports:
- "8443:8443"
volumes:
db_data: