-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.37 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.37 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
version: '3.8'
services:
# Main application container
app:
image: nginx:alpine
ports:
- "3000:80"
volumes:
- ./test-app:/usr/share/nginx/html:ro
depends_on:
- ailoop-sidecar
networks:
- ailoop-network
# Health check to ensure sidecar is ready
healthcheck:
test: ["CMD", "curl", "-f", "http://ailoop-sidecar:8081/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Ailoop sidecar container
ailoop-sidecar:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8080" # WebSocket port
- "8081:8081" # HTTP API port
environment:
- RUST_LOG=info
networks:
- ailoop-network
# Health check for the sidecar itself
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
# Test client container (optional, for testing the SDK)
test-client:
image: node:18-alpine
working_dir: /app
command: sh -c "npm install && npm test"
volumes:
- ../ailoop-js:/app:ro
depends_on:
- ailoop-sidecar
networks:
- ailoop-network
environment:
- AILOOP_BASE_URL=http://ailoop-sidecar:8081
networks:
ailoop-network:
driver: bridge
volumes:
test-app: