#!/bin/bash ############################################################################### # 运葌 docker ι•œεƒ ############################################################################### set -e function start() { docker run -d --name=tnbeureka --network=host -v /opt/log:/app/logs tnb/eureka docker run -d --name=tnbgateway --network=host -v /opt/log:/app/logs tnb/gateway docker run -d --name=tnbaccount --network=host -v /opt/log:/app/logs tnb/account docker run -d --name=tnbfile --network=host -v /opt/log:/app/logs tnb/file docker run -d --name=tnbuser --network=host -v /opt/log:/app/logs tnb/user docker run -d --name=tnbcontent --network=host -v /opt/log:/app/logs tnb/content docker run -d --name=tnbsearch --network=host -v /opt/log:/app/logs tnb/search docker run -d --name=tnbmessage --network=host \ -e NODE_ADDRESS=127.0.0.1 \ -v /opt/log:/app/logs \ tnb/message docker run -d --name=tnbapp --network=host tnb/tnbapp } function shutdown() { docker stop tnbeureka && docker rm tnbeureka docker stop tnbgateway && docker rm tnbgateway docker stop tnbaccount && docker rm tnbaccount docker stop tnbmessage && docker rm tnbmessage docker stop tnbfile && docker rm tnbfile docker stop tnbuser && docker rm tnbuser docker stop tnbcontent && docker rm tnbcontent docker stop tnbsearch && docker rm tnbsearch docker stop tnbsearch && docker rm tnbapp } start #shutdown