-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
147 lines (139 loc) · 3.29 KB
/
Copy pathdocker-compose.yml
File metadata and controls
147 lines (139 loc) · 3.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
services:
mysql:
image: mysql:8.0.45
env_file:
- .env
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
command: --port=${DB_PORT}
volumes:
- mysql-data:/var/lib/mysql
- ./mysql:/docker-entrypoint-initdb.d
ports:
- "127.0.0.1:${DB_PORT}:${DB_PORT}"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-P", "${DB_PORT}", "-u", "root", "-p${DB_PASSWORD}"]
timeout: 20s
retries: 10
networks:
- cloudstore-network
server:
build:
context: ./src/main/java/com/cloudstore/server
dockerfile: Dockerfile
env_file:
- .env
environment:
DB_HOST: mysql
DB_PORT: ${DB_PORT}
DB_NAME: ${DB_NAME}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
JWT_EXPIRATION_MS: ${JWT_EXPIRATION_MS}
JWT_ISSUER: ${JWT_ISSUER}
JWT_AUDIENCE: ${JWT_AUDIENCE}
REDIS_HOST: redis
REDIS_PORT: 6379
LLM_SERVICE_URL: ${LLM_SERVICE_URL}
RABBITMQ_HOST: rabbitmq
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
llm-assistant:
condition: service_healthy
rabbitmq:
condition: service_healthy
ports:
- "127.0.0.1:9999:9999"
networks:
- cloudstore-network
restart: unless-stopped
redis:
image: redis:8.6.1
container_name: redis
ports:
- "127.0.0.1:6379:6379"
volumes:
- redis_data:/data
networks:
- cloudstore-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
rabbitmq:
image: rabbitmq:4.3.0-management
container_name: rabbitmq
ports:
- "127.0.0.1:5672:5672"
- "127.0.0.1:15672:15672"
networks:
- cloudstore-network
restart: unless-stopped
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
llm-assistant:
build:
context: ./src/llm-assistant
dockerfile: Dockerfile
env_file:
- .env
environment:
OLLAMA_BASE_URL: ${OLLAMA_BASE_URL}
OLLAMA_MODEL: ${OLLAMA_MODEL}
depends_on:
ollama:
condition: service_started
ports:
- "127.0.0.1:8000:8000"
networks:
- cloudstore-network
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 10s
timeout: 5s
retries: 5
ollama:
image: ollama/ollama:0.11.4
ports:
- "127.0.0.1:11434:11434"
volumes:
- ollama_data:/root/.ollama
networks:
- cloudstore-network
restart: unless-stopped
client:
build:
context: ./src/client
dockerfile: Dockerfile
env_file:
- .env
environment:
BACKEND_HOST: server
BACKEND_PORT: 9999
depends_on:
- server
ports:
- "127.0.0.1:8501:8501"
networks:
- cloudstore-network
restart: unless-stopped
volumes:
mysql-data:
redis_data:
ollama_data:
networks:
cloudstore-network:
driver: bridge