docker-compose部署单机Pulsar以及docker部署pulsar-manager v0.2.0

架构

docker-compose部署单机Pulsar以及docker部署pulsar-manager v0.2.0_第1张图片

docker-compose

version: '2'

services:

  standalone:
    image: apachepulsar/pulsar
    expose:
      - 8080
      - 6650
    restart: always
    environment:
      - BOOKIE_MEM=" -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g"
    volumes:
      - pulsardata:/pulsar/data:rw
      - pulsarconf:/pulsar/conf:rw
    ports:
      - 8080:8080
      - 6650:6650

    command: >
      /bin/bash -c
      "bin/apply-config-from-env.py conf/standalone.conf
      && exec bin/pulsar standalone --advertised-address standalone"

  dashboard:
    image: apachepulsar/pulsar-dashboard
    depends_on:
      - standalone
    ports:
      - "81:80"
    environment:
      - SERVICE_URL=http://standalone:8080

  pulsar-manager:
    image: "apachepulsar/pulsar-manager:v0.2.0"
    restart: always
    ports:
      - "9527:9527"
      - "7750:7750"
    depends_on:
      - standalone
    links:
      - standalone
    environment:
      - SPRING_CONFIGURATION_FILE=/pulsar-manager/pulsar-manager/application.properties

volumes:
  pulsardata:
    driver: local
  pulsarconf:
    driver: local


manager创建账号密码

localhost可以替换成为你的服务器地址

CSRF_TOKEN=$(curl http://localhost:7750/pulsar-manager/csrf-token)

 curl \
>    -H 'X-XSRF-TOKEN: $CSRF_TOKEN' \
>    -H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \
>    -H "Content-Type: application/json" \
>    -X PUT http://localhost:7750/pulsar-manager/users/superuser \
>    -d '{"name": "admin", "password": "apachepulsar", "description": "test", "email": "[email protected]"}'
{
   "message":"Add s

你可能感兴趣的:(docker,docker,ar,容器)