123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- # This compose file will deploy the services, and bootup a mongo server.
- # Copyright IBM Corp., All Rights Reserved.
- #
- # SPDX-License-Identifier: Apache-2.0
- #
- # Local `/opt/cello/mongo` will be used for the db storage.
- # cello-nginx: proxy to access operator dashboard service, listen on 8080
- # cello-operator-dashboard: dashboard service for operators
- # cello-user-dashboard: user service of cello, listen on 8081
- # engine: engine service of cello to provide RESTful APIs, listen on 80
- # cello-mongo: mongo db
- version: '3.2'
- services:
- # nginx as front end for the services, disable now
- #nginx:
- # image: hyperledger/cello-nginx
- # hostname: cello-nginx
- # container_name: cello-nginx
- # restart: always
- # deploy:
- # resources:
- # limits:
- # cpus: '0.50'
- # memory: 2048M
- # reservations:
- # cpus: '0.10'
- # memory: 256M
- # ports:
- # - "80:80"
- # - "8080:8080"
- # environment:
- # - BACKEND=cello-operator-dashboard
- # - PORT=8080
- # - USERNAME=admin
- # - PASSWORD=pass
- # redis:
- # image: redis
- rabbitmq:
- image: rabbitmq
- restart: unless-stopped
- container_name: cello-dashboard_rabbitmq
- environment:
- - RABBITMQ_DEFAULT_USER=$RABBITMQ_DEFAULT_USER
- - RABBITMQ_DEFAULT_PASS=$RABBITMQ_DEFAULT_PASS
- - RABBITMQ_DEFAULT_VHOST=$RABBITMQ_DEFAULT_VHOST
- # cello dashboard service for network operator
- operator-dashboard:
- image: hyperledger/cello-operator-dashboard
- container_name: cello-operator-dashboard
- hostname: cello-operator-dashboard
- restart: unless-stopped
- links:
- - rabbitmq
- environment:
- - MONGO_URL=mongodb://cello-mongo:27017 # used by pymongo, deprecate soon
- - MONGO_HOST=mongo
- - MONGO_DB=dev
- - MONGODB_PORT=27017
- - DEBUG=True # in debug mode, service will auto-restart
- - LOG_LEVEL=$LOG_LEVEL # what level log will be output
- - STATIC_FOLDER=$STATIC_FOLDER
- - TEMPLATE_FOLDER=$TEMPLATE_FOLDER
- - ENABLE_EMAIL_ACTIVE=$ENABLE_EMAIL_ACTIVE
- - BROKER=amqp://$RABBITMQ_DEFAULT_USER:$RABBITMQ_DEFAULT_PASS@rabbitmq:5672/$RABBITMQ_DEFAULT_VHOST
- - BACKEND=amqp://$RABBITMQ_DEFAULT_USER:$RABBITMQ_DEFAULT_PASS@rabbitmq:5672/$RABBITMQ_DEFAULT_VHOST
- ports:
- - "8080:8080"
- volumes: # This should be removed in product env
- - $ROOT_PATH/src/agent/docker/_compose_files:/cello
- - $ROOT_PATH/src:/app
- #TODO: need to follow other images to put at dockerhub
- user-dashboard:
- image: hyperledger/cello-user-dashboard
- container_name: cello-user-dashboard
- hostname: cello-user-dashboard
- links:
- - mongo:dashboard_mongo
- - dashboard_mongo
- - operator-dashboard
- ports:
- - "8081:8081"
- environment:
- - NODE_ENV=dev
- - RESTFUL_SERVER=operator-dashboard:8080
- - DEBUG=node:*
- - DEV=$DEV
- - LOG_LEVEL=DEBUG
- - ENABLE_EMAIL_ACTIVE=$ENABLE_EMAIL_ACTIVE
- - SMTP_SERVER=$SMTP_SERVER
- - SMTP_PORT=$SMTP_PORT
- - SMTP_AUTH_USERNAME=$SMTP_AUTH_USERNAME
- - SMTP_AUTH_PASSWORD=$SMTP_AUTH_PASSWORD
- - MONGO_HOST=dashboard_mongo
- - MONGO_DB=user_dashboard
- - FROM_EMAIL=$FROM_EMAIL
- - WEBROOT=$USER_DASHBOARD_WEBROOT
- - FABRIC_CFG_PATH=/etc/hyperledger/fabric
- volumes:
- - $ROOT_PATH/user-dashboard/src:/var/www
- - /opt/cello/baas:/opt/data
- # cello engine service
- engine:
- image: hyperledger/cello-engine
- container_name: cello-engine
- hostname: cello-engine
- restart: unless-stopped
- environment:
- - MONGO_URL=mongodb://cello-mongo:27017 # used by pymongo, deprecate soon
- - MONGO_HOST=mongo
- - MONGO_DB=dev
- - MONGODB_PORT=27017
- - DEBUG=$DEV # in debug mode, service will auto-restart
- - LOG_LEVEL=$LOG_LEVEL # what level log will be output
- ports:
- - "80:80"
- volumes:
- - $ROOT_PATH/src:/app
- # cello watchdog service
- watchdog:
- image: hyperledger/cello-watchdog
- container_name: cello-watchdog
- hostname: cello-watchdog
- restart: unless-stopped
- environment:
- - MONGO_URL=mongodb://mongo:27017 # used by pymongo, deprecate soon
- - MONGO_HOST=mongo
- - MONGO_DB=dev
- - MONGODB_PORT=27017
- - DEBUG=$DEV # in debug mode, service will auto-restart
- - LOG_LEVEL=$LOG_LEVEL # what level log will be output
- volumes: # This should be removed in product env
- - $ROOT_PATH/src:/app
- # mongo database, may use others in future
- mongo:
- image: mongo:3.4.10
- hostname: cello-mongo
- container_name: cello-mongo
- restart: unless-stopped
- deploy:
- resources:
- limits:
- cpus: '0.50'
- memory: 2048M
- reservations:
- cpus: '0.10'
- memory: 256M
- ports:
- #- "27017:27017" # use follow line instead in production env
- - "127.0.0.1:27017:27017"
- - "127.0.0.1:27018:27018"
- environment:
- - NO_USED=0
- volumes:
- - /opt/cello/mongo:/data/db
- # TODO: we may use one mongo instance, that should be enough
- dashboard_mongo:
- image: mongo:3.4.10
- hostname: cello-dashboard_mongo
- container_name: cello-dashboard_mongo
- restart: unless-stopped
- environment:
- - NO_USED=0
- volumes:
- - /opt/cello/dashboard_mongo:/data/db
|