Skip to content

Commit

Permalink
Add sample docker-compose file with pulsar standalone (apache#2617)
Browse files Browse the repository at this point in the history
Add sample compose file for experimentation purposes.
  • Loading branch information
aahmed-se authored and sijie committed Sep 24, 2018
1 parent 6481a4e commit 5b88042
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
45 changes: 45 additions & 0 deletions docker-compose/standalone-dashboard/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!--
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.
-->
# Docker Compose

In this folder path run the following command to start the cluster

```
docker-compose up
```

## Urls

Assuming localhost the the following endpoint will be available


[web-dashboard](http://localhost:80) pulsar admin dashboard, shows various metrics and metatdata information about the cluster

[broker-admin](http://localhost:8080) access broker rest interface

[broker-service-url](pulsar//:locahost:6650) broker service url for use with producers and consumers


You can shut it down with the following command in folder path

```
docker-compose down
```
43 changes: 43 additions & 0 deletions docker-compose/standalone-dashboard/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# 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'

services:

standalone:
image: apachepulsar/pulsar
expose:
- 8080
- 6650
environment:
- PULSAR_MEM=" -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g"
command: >
/bin/bash -c
"bin/apply-config-from-env.py conf/standalone.conf
&& bin/pulsar standalone"
dashboard:
image: apachepulsar/pulsar-dashboard
depends_on:
- standalone
ports:
- "80:80"
environment:
- SERVICE_URL=http://standalone:8080

0 comments on commit 5b88042

Please sign in to comment.