-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
177 lines (164 loc) · 4.92 KB
/
Copy pathdocker-compose.yml
File metadata and controls
177 lines (164 loc) · 4.92 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
version: '3.8'
# VEDS MVP Development Environment
# Stack: SurrealDB + XTDB + Dragonfly + Rust + Deno
# Start with: docker-compose up -d
# IMPORTANT: Copy .env.example to .env and set all required variables
services:
# ===========================================================================
# MVP CORE: 3 Databases
# ===========================================================================
# SurrealDB - Graph/Document store for transport network
surrealdb:
image: surrealdb/surrealdb:v1.5.4
container_name: veds-surrealdb
ports:
- "8000:8000"
volumes:
- surreal_data:/data
command: start --log info --user ${SURREALDB_USER:?SURREALDB_USER required} --pass ${SURREALDB_PASS:?SURREALDB_PASS required} file:/data/veds.db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- veds-network
# XTDB - Bitemporal database for constraints, decisions, audit
xtdb:
image: ghcr.io/xtdb/xtdb:2.0.0-beta7
container_name: veds-xtdb
ports:
- "3000:3000"
volumes:
- xtdb_data:/var/lib/xtdb
- ./config/xtdb.yaml:/etc/xtdb.yaml:ro
environment:
- XTDB_NODE_DIR=/var/lib/xtdb
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/status"]
interval: 10s
timeout: 5s
retries: 5
networks:
- veds-network
# Dragonfly - Redis-compatible cache for hot data
dragonfly:
image: docker.dragonflydb.io/dragonflydb/dragonfly:v1.15.1
container_name: veds-dragonfly
ports:
- "6379:6379"
volumes:
- dragonfly_data:/data
ulimits:
memlock: -1
command: dragonfly --requirepass ${DRAGONFLY_PASS:?DRAGONFLY_PASS required} --maxmemory 512mb
healthcheck:
test: ["CMD", "redis-cli", "-a", "${DRAGONFLY_PASS}", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- veds-network
# ===========================================================================
# MVP CORE: 2 Application Services
# ===========================================================================
# Rust Route Optimizer (gRPC + metrics)
rust-optimizer:
build:
context: ./src/rust-routing
dockerfile: Dockerfile
container_name: veds-optimizer
ports:
- "50051:50051" # gRPC
- "8090:8090" # HTTP metrics
environment:
- RUST_LOG=${RUST_LOG:-info}
- SURREALDB_URL=ws://surrealdb:8000
- SURREALDB_USER=${SURREALDB_USER:?SURREALDB_USER required}
- SURREALDB_PASS=${SURREALDB_PASS:?SURREALDB_PASS required}
- DRAGONFLY_URL=redis://dragonfly:6379
- DRAGONFLY_PASS=${DRAGONFLY_PASS:?DRAGONFLY_PASS required}
depends_on:
surrealdb:
condition: service_healthy
dragonfly:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- veds-network
# Deno API Gateway (REST)
deno-api:
build:
context: ./src/deno-api
dockerfile: Dockerfile
container_name: veds-api
ports:
- "4000:4000"
environment:
- PORT=4000
- HOST=0.0.0.0
- SURREALDB_URL=ws://surrealdb:8000
- SURREALDB_USER=${SURREALDB_USER:?SURREALDB_USER required}
- SURREALDB_PASS=${SURREALDB_PASS:?SURREALDB_PASS required}
- XTDB_URL=http://xtdb:3000
- DRAGONFLY_URL=redis://dragonfly:6379
- DRAGONFLY_PASS=${DRAGONFLY_PASS:?DRAGONFLY_PASS required}
- OPTIMIZER_URL=http://rust-optimizer:8090
depends_on:
surrealdb:
condition: service_healthy
xtdb:
condition: service_healthy
dragonfly:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
interval: 10s
timeout: 5s
retries: 5
networks:
- veds-network
# ===========================================================================
# DEFERRED TO V2 (profiles)
# ===========================================================================
# Julia Analytics (deferred - resource intensive)
julia-viz:
build:
context: ./src/julia-viz
dockerfile: Dockerfile
container_name: veds-viz
ports:
- "8081:8080"
environment:
- JULIA_NUM_THREADS=auto
- SURREALDB_URL=ws://surrealdb:8000
- SURREALDB_USER=${SURREALDB_USER}
- SURREALDB_PASS=${SURREALDB_PASS}
- XTDB_URL=http://xtdb:3000
- DRAGONFLY_URL=redis://dragonfly:6379
- DRAGONFLY_PASS=${DRAGONFLY_PASS}
profiles:
- v2
networks:
- veds-network
# Database admin UI (dev tools)
adminer:
image: adminer:latest
container_name: veds-adminer
ports:
- "8082:8080"
profiles:
- tools
networks:
- veds-network
networks:
veds-network:
driver: bridge
volumes:
surreal_data:
dragonfly_data:
xtdb_data: