#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
volumes:
metadata_data: {}
middle_var: {}
historical_var: {}
broker_var: {}
coordinator_var: {}
router_var: {}
druid_shared: {}
networks:
druid-network:
driver: bridge
services:
postgres:
container_name: postgres
image: postgres:17
volumes:
- metadata_data:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=FoolishPassword
- POSTGRES_USER=druid
- POSTGRES_DB=druid
networks:
- druid-network
# Need 3.5 or later for container nodes
zookeeper:
container_name: zookeeper
image: zookeeper:3.5.10
environment:
- ZOO_MY_ID=1
networks:
- druid-network
coordinator:
image: apache/druid:34.0.0
container_name: coordinator
volumes:
- druid_shared:/opt/shared
- coordinator_var:/opt/druid/var
ports:
- "8081:8081"
depends_on:
- zookeeper
- postgres
command:
- coordinator
env_file:
- environment
networks:
- druid-network
broker:
image: apache/druid:34.0.0
container_name: broker
volumes:
- broker_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
command:
- broker
env_file:
- environment
networks:
- druid-network
historical:
image: apache/druid:34.0.0
container_name: historical
volumes:
- druid_shared:/opt/shared
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
command:
- historical
env_file:
- environment
networks:
- druid-network
middlemanager:
image: apache/druid:34.0.0
container_name: middlemanager
volumes:
- druid_shared:/opt/shared
- middle_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
command:
- middleManager
env_file:
- environment
networks:
- druid-network
router:
image: apache/druid:34.0.0
container_name: router
volumes:
- router_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "8888:8888"
command:
- router
env_file:
- environment
networks:
- druid-network
# uncomment to run Druid MCP Server Application with the above services together
# # Your Druid MCP Server Application
# druid-mcp-server:
# build: ../../
# container_name: druid-mcp-server
# environment:
# - druid.router.url=http://router:8888
# - server.port=8080
# ports:
# - "8080:8080"
# networks:
# - druid-network
# depends_on:
# - router