-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (45 loc) · 1.23 KB
/
Copy pathdocker-compose.yml
File metadata and controls
48 lines (45 loc) · 1.23 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
services:
mock-openai-api:
build: .
image: zerob13/mock-openai-api:1.0.6
container_name: mock-openai-api
restart: unless-stopped
ports:
- "3000:3000"
- "127.0.0.1:3001:3001"
volumes:
- mock-openai-data:/data
environment:
- NODE_ENV=production
- PORT=3000
- HOST=0.0.0.0
- ADMIN_PORT=3001
- ADMIN_HOST=0.0.0.0
- ADMIN_TOKEN=${ADMIN_TOKEN:?Set ADMIN_TOKEN before starting the admin console}
- DATA_DIR=/data
- VERBOSE=false
- TZ=UTC
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (res) => { res.statusCode === 200 ? process.exit(0) : process.exit(1); }).on('error', () => process.exit(1));"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Add nginx reverse proxy for production
# nginx:
# image: nginx:alpine
# container_name: mock-openai-nginx
# restart: unless-stopped
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro
# depends_on:
# - mock-openai-api
networks:
default:
name: mock-openai-network
volumes:
mock-openai-data: