-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
69 lines (68 loc) · 1.52 KB
/
docker-compose.yml
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
services:
Keto:
container_name: Keto
image: python:3.13-alpine3.21
working_dir: /opt/keto
deploy:
resources:
limits:
memory: 4G
env_file:
- .env
environment:
- PYTHONUNBUFFERED=1
dns:
- 8.8.8.8
- 8.8.4.4
volumes:
- ./:/opt/keto
command: >
sh -c "
apk --no-cache --update add git build-base cmake python3-dev linux-headers rust cargo ffmpeg freetype-dev libpng-dev openblas-dev libffi-dev &&
pip install --no-cache-dir -r requirements.txt && python main.py ${LOAD_ARGS:-}
"
restart: unless-stopped
cap_drop:
- ALL
cap_add:
- DAC_OVERRIDE
security_opt:
- no-new-privileges:true
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
depends_on:
redis:
condition: service_healthy
redis:
image: redis:alpine
container_name: keto_redis
command: redis-server --requirepass ${REDIS_PASSWORD} --appendonly yes
deploy:
resources:
limits:
memory: 2G
volumes:
- ./redis_data:/data
restart: unless-stopped
cap_drop:
- ALL
cap_add:
- DAC_OVERRIDE
- SETGID
- SETUID
- CHOWN
security_opt:
- no-new-privileges:true
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 5s
retries: 5