-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
66 lines (64 loc) · 1.4 KB
/
docker-compose.prod.yml
File metadata and controls
66 lines (64 loc) · 1.4 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
services:
chatscript:
build: .
volumes:
- ./data/users:/opt/ChatScript/USERS
- ./data/logs:/opt/ChatScript/LOGS
mem_limit: 256m
cpus: 0.50
pids_limit: 64
logging:
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD-SHELL", "printf 'healthcheck\\0\\0ping\\0' | nc -w 2 localhost 1024"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
restart: unless-stopped
middleware:
image: python:3.12-slim
command: ["python", "/app/middleware.py"]
volumes:
- ./middleware.py:/app/middleware.py:ro
environment:
CS_HOST: chatscript
CS_PORT: "1024"
PORT: "8000"
mem_limit: 128m
cpus: 0.25
pids_limit: 32
read_only: true
logging:
options:
max-size: "10m"
max-file: "3"
depends_on:
chatscript:
condition: service_healthy
restart: unless-stopped
nginx:
image: nginx:1.27-alpine
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/templates/default.conf.template:ro
environment:
VALID_API_KEY: ${VALID_API_KEY:-changeme}
mem_limit: 64m
cpus: 0.25
pids_limit: 32
read_only: true
tmpfs:
- /tmp
- /var/cache/nginx
- /run
logging:
options:
max-size: "10m"
max-file: "3"
depends_on:
- middleware
restart: unless-stopped