druid/distribution/docker/docker-compose.yml
Don Bowman b3dcbe70ad Add docker container for druid (#6896)
* Add docker container for druid

This container is an 'omnibus' (since there is such a high
overlap with the various services). It includes all contrib
extension as well as the msql connector.

It is intended to be run as `docker run NAME SERVICE`
(e.g. docker run druid:latest broker)

* Add Apache license header

* Resolve issues from Pull Request review

* Add comments at top of script per PR comments

* Revert BUILDKIT. Not available everywhere.

* Don't set hostname, allow default (IP)

Some environments (e.g. Kubernetes Deployments) don't resolve
hostname to IP.

* Switch to amd64 glibc-based busybox from 32-bit uclibc

* Override service-specific configuration

* Replace MAINTAINER w/ LABEL

* Add mysql connector to application classpath

This works around issue #3770
https://github.com/apache/incubator-druid/issues/3770

* Add docker-compose and sample environment

Signed-off-by: Don Bowman <don@agilicus.com>
2019-02-08 12:12:28 +00:00

125 lines
2.6 KiB
YAML

#
# 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.
#
version: "2.2"
volumes:
metadata_data: {}
middle_var: {}
historical_var: {}
broker_var: {}
coordinator_var: {}
overlord_var: {}
services:
postgres:
container_name: postgres
image: postgres:latest
volumes:
- metadata_data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=FoolishPassword
- POSTGRES_USER=druid
- POSTGRES_DB=druid
# Need 3.5 or later for container nodes
zookeeper:
container_name: zookeeper
image: zookeeper:3.5
environment:
- ZOO_MY_ID=1
coordinator:
image: druid
container_name: coordinator
volumes:
- coordinator_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
ports:
- "3001:8081"
command:
- coordinator
env_file:
- environment
broker:
image: druid
container_name: broker
volumes:
- broker_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "3002:8082"
command:
- broker
env_file:
- environment
historical:
image: druid
container_name: historical
volumes:
- historical_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "3003:8083"
command:
- historical
env_file:
- environment
overlord:
image: druid
container_name: overlord
volumes:
- overlord_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
ports:
- "4000:8090"
command:
- overlord
env_file:
- environment
middlemanager:
image: druid
container_name: middlemanager
volumes:
- middle_var:/opt/druid/var
depends_on:
- zookeeper
- postgres
- coordinator
ports:
- "4001:8091"
command:
- middleManager
env_file:
- environment