@@ -3,6 +3,7 @@ version: '3.8'
33services :
44 # PostgreSQL for persistence
55 postgres :
6+ profiles : ["core"]
67 image : postgres:14
78 container_name : odin-postgres
89 environment :
@@ -21,6 +22,7 @@ services:
2122
2223 # Elasticsearch for visibility (optional)
2324 elasticsearch :
25+ profiles : ["observability"]
2426 image : docker.elastic.co/elasticsearch/elasticsearch:8.11.0
2527 container_name : odin-elasticsearch
2628 environment :
@@ -39,6 +41,7 @@ services:
3941
4042 # OpenTelemetry Collector
4143 otel-collector :
44+ profiles : ["observability"]
4245 image : otel/opentelemetry-collector-contrib:0.91.0
4346 container_name : odin-otel-collector
4447 command : ["--config=/etc/otel-collector-config.yaml"]
@@ -54,6 +57,7 @@ services:
5457
5558 # Jaeger for distributed tracing
5659 jaeger :
60+ profiles : ["observability"]
5761 image : jaegertracing/all-in-one:1.51
5862 container_name : odin-jaeger
5963 ports :
@@ -64,6 +68,7 @@ services:
6468
6569 # Prometheus for metrics
6670 prometheus :
71+ profiles : ["observability"]
6772 image : prom/prometheus:v2.48.0
6873 container_name : odin-prometheus
6974 command :
@@ -79,6 +84,7 @@ services:
7984
8085 # Grafana for visualization
8186 grafana :
87+ profiles : ["observability"]
8288 image : grafana/grafana:10.2.2
8389 container_name : odin-grafana
8490 ports :
@@ -95,6 +101,7 @@ services:
95101
96102 # Odin Control Plane gRPC Service
97103 odin-grpc :
104+ profiles : ["core"]
98105 build :
99106 context : .
100107 dockerfile : Dockerfile
@@ -104,19 +111,24 @@ services:
104111 - " 7233:7233"
105112 environment :
106113 - HUGO_ORCHESTRATOR_DB_CONNECTION=Host=postgres;Database=orchestrator;Username=odin;Password=odin_dev_password
107- - HUGO_ORCHESTRATOR_ELASTICSEARCH_URL=http://elasticsearch:9200
108- - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=http://otel-collector:4317
114+ - HUGO_ORCHESTRATOR_ELASTICSEARCH_URL=${ELASTICSEARCH_URL:- http://elasticsearch:9200}
115+ - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=${OTLP_ENDPOINT:- http://otel-collector:4317}
109116 - HUGO_ORCHESTRATOR_SHARD_COUNT=512
110117 - HUGO_ORCHESTRATOR_HISTORY_RETENTION_DAYS=30
111118 depends_on :
112119 postgres :
113120 condition : service_healthy
114- otel-collector :
115- condition : service_started
116121 restart : unless-stopped
122+ healthcheck :
123+ test : ["CMD", "curl", "-f", "http://localhost:7233/"]
124+ interval : 30s
125+ timeout : 5s
126+ retries : 5
127+ start_period : 30s
117128
118129 # Odin Control Plane REST API
119130 odin-api :
131+ profiles : ["core"]
120132 build :
121133 context : .
122134 dockerfile : Dockerfile
@@ -127,36 +139,39 @@ services:
127139 - " 8081:8081"
128140 environment :
129141 - HUGO_ORCHESTRATOR_DB_CONNECTION=Host=postgres;Database=orchestrator;Username=odin;Password=odin_dev_password
130- - HUGO_ORCHESTRATOR_ELASTICSEARCH_URL=http://elasticsearch:9200
131- - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=http://otel-collector:4317
132- - HUGO_ORCHESTRATOR_GRPC_ENDPOINT=http://odin-grpc:7233
142+ - HUGO_ORCHESTRATOR_ELASTICSEARCH_URL=${ELASTICSEARCH_URL:- http://elasticsearch:9200}
143+ - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=${OTLP_ENDPOINT:- http://otel-collector:4317}
144+ - HUGO_ORCHESTRATOR_GRPC_ENDPOINT=${GRPC_ENDPOINT:- http://odin-grpc:7233}
133145 depends_on :
134146 postgres :
135147 condition : service_healthy
136148 odin-grpc :
137149 condition : service_started
138- otel-collector :
139- condition : service_started
140150 restart : unless-stopped
151+ healthcheck :
152+ test : ["CMD", "curl", "-f", "http://localhost:8080/"]
153+ interval : 30s
154+ timeout : 5s
155+ retries : 5
156+ start_period : 30s
141157
142158 # Odin System Workers
143159 odin-workers :
160+ profiles : ["core"]
144161 build :
145162 context : .
146163 dockerfile : Dockerfile
147164 target : runtime-workers
148165 container_name : odin-workers
149166 environment :
150167 - HUGO_ORCHESTRATOR_DB_CONNECTION=Host=postgres;Database=orchestrator;Username=odin;Password=odin_dev_password
151- - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=http://otel-collector:4317
152- - HUGO_ORCHESTRATOR_GRPC_ENDPOINT=http://odin-grpc:7233
168+ - HUGO_ORCHESTRATOR_OTLP_ENDPOINT=${OTLP_ENDPOINT:- http://otel-collector:4317}
169+ - HUGO_ORCHESTRATOR_GRPC_ENDPOINT=${GRPC_ENDPOINT:- http://odin-grpc:7233}
153170 depends_on :
154171 postgres :
155172 condition : service_healthy
156173 odin-grpc :
157174 condition : service_started
158- otel-collector :
159- condition : service_started
160175 restart : unless-stopped
161176
162177volumes :
0 commit comments