-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
54 lines (53 loc) · 1.39 KB
/
compose.yaml
File metadata and controls
54 lines (53 loc) · 1.39 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
services:
app:
build:
context: .
image: dvcon-paper-rag:local
depends_on:
- grobid
command:
- sh
- -c
- >-
uv run --project backend python scripts/wait_for_http.py
--url http://grobid:8070/api/isalive
--contains true
--timeout 300
&& uv run --project backend backend
env_file:
- .env
environment:
GROBID_URL: http://grobid:8070
GROBID_ENABLED: ${GROBID_ENABLED:-true}
PORT: ${PORT:-8000}
DATA_DIR: ${DATA_DIR:-data}
healthcheck:
test:
- CMD-SHELL
- >-
python -c "import os, sys, urllib.request; port = os.environ.get('PORT', '8000');
sys.exit(0) if urllib.request.urlopen(f'http://127.0.0.1:{port}/api/health', timeout=5).status == 200 else sys.exit(1)"
interval: 15s
timeout: 10s
retries: 10
start_period: 30s
ports:
- "${APP_HOST_PORT:-8011}:${PORT:-8000}"
volumes:
- "./${DATA_DIR:-data}:/app/${DATA_DIR:-data}"
grobid:
image: ${GROBID_IMAGE:-grobid/grobid:0.8.2-crf}
init: true
ulimits:
core: 0
healthcheck:
test:
- CMD-SHELL
- wget -qO- http://127.0.0.1:8070/api/isalive | grep -q true
interval: 15s
timeout: 10s
retries: 30
start_period: 20s
ports:
- "${GROBID_PORT:-8070}:8070"
- "${GROBID_ADMIN_PORT:-8071}:8071"