-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
180 lines (173 loc) · 4.55 KB
/
compose.yml
File metadata and controls
180 lines (173 loc) · 4.55 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
services:
tapiro-api-internal:
build:
context: ./tapiro-api-internal
dockerfile: dockerfile
target: development
container_name: tapiro-api-internal
volumes:
- ./tapiro-api-internal:/app
- /app/node_modules
environment:
- NODE_ENV=development
- MONGODB_URI=${MONGODB_URI}
- DB_NAME=tapiro
- REDIS_HOST=redis
- REDIS_PORT=6379
- BASE_URL=http://localhost:3000
- PORT=3000
- AUTH0_SPA_CLIENT_ID=${AUTH0_SPA_CLIENT_ID}
- AUTH0_ISSUER_BASE_URL=${AUTH0_ISSUER_BASE_URL}
- AUTH0_TOKEN_URL=${AUTH0_TOKEN_URL}
- AUTH0_AUTHORIZE_URL=${AUTH0_AUTHORIZE_URL}
- AUTH0_AUDIENCE=${AUTH0_AUDIENCE}
- AUTH0_MANAGEMENT_API_TOKEN=${AUTH0_MANAGEMENT_API_TOKEN}
- AUTH0_USER_ROLE_ID=${AUTH0_USER_ROLE_ID}
- AUTH0_STORE_ROLE_ID=${AUTH0_STORE_ROLE_ID}
- FRONTEND_URL=http://localhost:5173
- AUTH0_M2M_CLIENT_ID=${AUTH0_M2M_CLIENT_ID}
- AUTH0_M2M_CLIENT_SECRET=${AUTH0_M2M_CLIENT_SECRET}
- AI_SERVICE_URL=http://ml-service:8000/api
- AI_SERVICE_API_KEY=${AI_SERVICE_API_KEY}
- AUTH0_DOMAIN=${AUTH0_DOMAIN}
- EXTERNAL_API_URL=http://tapiro-api-external:3001
ports:
- "3000:3000"
depends_on:
redis:
condition: service_healthy
networks:
- tapiro-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
tapiro-api-external:
build:
context: ./tapiro-api-external
dockerfile: dockerfile
target: development
container_name: tapiro-api-external
volumes:
- ./tapiro-api-external:/app
- /app/node_modules
environment:
- NODE_ENV=development
- MONGODB_URI=${MONGODB_URI}
- DB_NAME=tapiro
- REDIS_HOST=redis
- REDIS_PORT=6379
- PORT=3001
- AI_SERVICE_URL=http://ml-service:8000/api
- AI_SERVICE_API_KEY=${AI_SERVICE_API_KEY}
- ALLOWED_ORIGINS=http://localhost:5174
ports:
- "3001:3001"
depends_on:
redis:
condition: service_healthy
tapiro-api-internal:
condition: service_started
networks:
- tapiro-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
ml-service:
build:
context: ./ml-service
dockerfile: Dockerfile
container_name: tapiro-ai
volumes:
- ./ml-service:/app
- /app/__pycache__
- ml-model-cache:/app/model_cache
environment:
- MONGODB_URI=${MONGODB_URI}
- API_BASE_URL=http://tapiro-api-internal:3000
- EXTERNAL_API_URL=http://tapiro-api-external:3001
- MONGODB_DB_NAME=tapiro
- SECRET_KEY=${AI_SERVICE_API_KEY}
- DEBUG=true
- REDIS_HOST=redis
- HF_HOME=/app/model_cache
- XDG_CACHE_HOME=/app/model_cache
ports:
- "8000:8000"
networks:
- tapiro-net
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
web:
build:
context: ./web
dockerfile: dockerfile
target: development
container_name: tapiro-web
volumes:
- ./web:/app
- /app/node_modules
environment:
- NODE_ENV=development
- VITE_API_URL=http://localhost:3000
- VITE_AUTH0_CLIENT_ID=${AUTH0_SPA_CLIENT_ID}
- VITE_AUTH0_DOMAIN=${AUTH0_DOMAIN}
- VITE_AUTH0_AUDIENCE=${AUTH0_AUDIENCE}
ports:
- "5173:5173"
networks:
- tapiro-net
depends_on:
- tapiro-api-internal
healthcheck:
test: ["CMD", "wget", "-O", "/dev/null", "http://localhost:5173"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
demo-store:
build:
context: ./demo
dockerfile: Dockerfile
container_name: demo
environment:
- VITE_STORE_API_URL=http://localhost:3001
ports:
- "5174:80"
networks:
- tapiro-net
depends_on:
- tapiro-api-external
redis:
image: redis:alpine
container_name: tapiro-redis
ports:
- "6379:6379"
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
networks:
- tapiro-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
networks:
tapiro-net:
volumes:
redis-data:
ml-model-cache: