-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (71 loc) · 1.93 KB
/
docker-compose.yml
File metadata and controls
75 lines (71 loc) · 1.93 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
services:
# Cosmos DB vNext Emulator
cosmosdb:
build:
context: ./sandboxes/cosmosdb
dockerfile: Dockerfile
container_name: cosmosdb
ports:
- "8081:8081"
- "8080:8080"
networks:
- codapi-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/status"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
# Client image (pre-built, used by Codapi on-demand)
cosmosdb-client:
build:
context: ./sandboxes/cosmosdb
dockerfile: Dockerfile.client
image: codapi/cosmosdb-client
container_name: cosmosdb-client-builder
command: /bin/true
# Codapi Server (serves cosmosdb sandbox queries)
codapi:
build:
context: .
dockerfile: Dockerfile.codapi
container_name: codapi-server
ports:
- "1313:1313"
volumes:
# CRITICAL: Mount Docker socket to allow spawning sibling containers
- /var/run/docker.sock:/var/run/docker.sock
# Mount entire /tmp for code snippets (Codapi creates random subdirs)
# Spawned containers need access to same host paths
- /tmp:/tmp
networks:
- codapi-net
depends_on:
cosmosdb:
condition: service_healthy
cosmosdb-client:
condition: service_completed_successfully
restart: unless-stopped
# nginx - Reverse proxy and static file serving
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "80:80"
volumes:
# Static HTML files
- ./playground.html:/usr/share/nginx/html/playground.html:ro
- ./run.html:/usr/share/nginx/html/run.html:ro
# Dataset JSON files
- ./datasets:/usr/share/nginx/html/datasets:ro
# nginx configuration
- ./nginx-cosmosdb.conf:/etc/nginx/conf.d/default.conf:ro
networks:
- codapi-net
depends_on:
- codapi
restart: unless-stopped
networks:
codapi-net:
name: codapi-net
driver: bridge