-
Notifications
You must be signed in to change notification settings - Fork 678
Expand file tree
/
Copy pathcompose.yaml
More file actions
82 lines (80 loc) · 2.13 KB
/
compose.yaml
File metadata and controls
82 lines (80 loc) · 2.13 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
77
78
79
80
81
82
services:
postgres:
image: postgres:16
ports:
- "5432:5432"
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-agent_service}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
agent_service:
build:
context: .
dockerfile: docker/Dockerfile.service
ports:
- "8080:8080"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/info"]
interval: 5s
timeout: 5s
retries: 5
# Volume mount of development-only credentials since compose watch doesn't sync ignored files and doesn't do initial sync when the service starts
volumes:
- ./privatecredentials:/privatecredentials
develop:
watch:
- path: src/agents/
action: sync+restart
target: /app/agents/
- path: src/schema/
action: sync+restart
target: /app/schema/
- path: src/service/
action: sync+restart
target: /app/service/
- path: src/core/
action: sync+restart
target: /app/core/
- path: src/memory/
action: sync+restart
target: /app/memory/
streamlit_app:
build:
context: .
dockerfile: docker/Dockerfile.app
ports:
- "8501:8501"
depends_on:
- agent_service
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8501/healthz"]
interval: 5s
timeout: 5s
retries: 5
environment:
- AGENT_URL=http://agent_service:8080
develop:
watch:
- path: src/client/
action: sync+restart
target: /app/client/
- path: src/schema/
action: sync+restart
target: /app/schema/
- path: src/streamlit_app.py
action: sync+restart
target: /app/streamlit_app.py
volumes:
postgres_data: