-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (73 loc) · 1.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
76 lines (73 loc) · 1.64 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
75
76
services:
api:
build:
context: ./apps/api
dockerfile: Dockerfile
container_name: mini-rag-api
env_file: .env
environment:
NODE_ENV: production
SQLITE_PATH: /app/data/mini_rag.sqlite
FAISS_INDEX_DIR: /app/data/faiss
HF_HOME: /app/.hf_cache
API_CORS_ORIGINS: ${API_CORS_ORIGINS:-http://localhost:3000}
expose:
- "8000"
ports:
- "127.0.0.1:8000:8000"
volumes:
- api_data:/app/data
- hf_cache:/app/.hf_cache
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2.0"
memory: 2g
healthcheck:
test:
- CMD
- python
- -c
- "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/readyz').status == 200 else 1)"
interval: 15s
timeout: 5s
retries: 5
start_period: 30s
networks:
- mini_rag
web:
build:
context: ./apps/web
dockerfile: Dockerfile
container_name: mini-rag-web
environment:
NODE_ENV: production
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:8000}
ports:
- "127.0.0.1:3000:3000"
restart: unless-stopped
deploy:
resources:
limits:
cpus: "1.0"
memory: 512m
healthcheck:
test:
- CMD-SHELL
- "wget -qO- http://localhost:3000/ >/dev/null 2>&1 || exit 1"
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
depends_on:
api:
condition: service_healthy
networks:
- mini_rag
volumes:
api_data:
hf_cache:
networks:
mini_rag:
driver: bridge