Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
64 lines (64 loc) · 1.65 KB
/
Copy pathcompose.yaml
File metadata and controls
64 lines (64 loc) · 1.65 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
name: clausegraph
x-backend: &backend
build:
context: .
dockerfile: backend/Dockerfile
env_file:
- path: .env
required: false
environment:
ENVIRONMENT: development
DATABASE_URL: postgresql+psycopg://clausegraph:${POSTGRES_PASSWORD:-clausegraph-local-only}@db:5432/clausegraph
LOCAL_STORAGE_PATH: /app/.data/documents
volumes:
- originals:/app/.data
services:
db:
image: postgres:17-alpine
environment:
POSTGRES_DB: clausegraph
POSTGRES_USER: clausegraph
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-clausegraph-local-only}
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U clausegraph -d clausegraph"]
interval: 3s
timeout: 3s
retries: 20
migrate:
<<: *backend
command: ["python", "scripts/migrate.py"]
depends_on:
db:
condition: service_healthy
api:
<<: *backend
ports: ["127.0.0.1:8000:8000"]
depends_on:
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health', timeout=3)"]
interval: 5s
timeout: 5s
retries: 12
worker:
<<: *backend
command: ["python", "-m", "clausegraph.worker"]
depends_on:
migrate:
condition: service_completed_successfully
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
API_INTERNAL_URL: http://api:8000
ports: ["127.0.0.1:3000:3000"]
depends_on:
api:
condition: service_healthy
volumes:
postgres:
originals: