-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (87 loc) · 2.29 KB
/
docker-compose.yml
File metadata and controls
92 lines (87 loc) · 2.29 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
83
84
85
86
87
88
89
90
91
92
services:
postgres:
image: postgres:16-alpine
container_name: axon-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-axon}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-axon}"]
interval: 5s
timeout: 5s
retries: 12
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: axon-redis
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 12
restart: unless-stopped
frontend:
build:
context: .
dockerfile: docker/frontend.Dockerfile
container_name: axon-frontend
ports:
- "3000:3000"
environment:
NODE_ENV: production
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
restart: unless-stopped
backend:
build:
context: .
dockerfile: docker/backend.Dockerfile
container_name: axon-backend
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- axon_vector_db:/app/backend/.chroma
command: ["python", "start.py", "--host", "0.0.0.0", "--port", "8000"]
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=2)"]
interval: 10s
timeout: 5s
retries: 12
start_period: 20s
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: axon-nginx
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1/ >/dev/null 2>&1 || exit 1"]
interval: 10s
timeout: 5s
retries: 12
restart: unless-stopped
volumes:
postgres_data:
axon_vector_db: