1. 程式人生 > >docker-compose

docker-compose

docker-compose

version: "2"

services:

mongo.server:

container_name : mongo.server

image: 10.1.1.171:5000/eventbank/mongo

network_mode: backend

volumes:

- "/data/db:/data/db"

ports:

- "27017:27017"


rest.mysql.server:

container_name : rest.mysql.server

image: 10.1.1.171:5000/eventbank/percona

volumes:

- "/etc/mysql/rest/conf.d:/etc/mysql/conf.d"

- "/var/log/rest/mysql:/var/log/mysql"

- "/var/lib/rest/mysql:/var/lib/mysql"

- "/var/run/rest/mysqld:/var/run/mysqld"

environment:

- MYSQL_ROOT_PASSWORD=1q2w3e4r5t

network_mode: backend

ports:

- "3306:3306"


auth.mysql.server:

container_name : auth.mysql.server

image: 10.1.1.171:5000/eventbank/percona

volumes:

- "/etc/mysql/auth/conf.d:/etc/mysql/conf.d"

- "/var/log/auth/mysql:/var/log/mysql"

- "/var/lib/auth/mysql:/var/lib/mysql"

- "/var/run/rest/mysqld:/var/run/mysqld"

environment:

- MYSQL_ROOT_PASSWORD=1q2w3e4r5t

network_mode: backend

ports:

- "33306:3306"


redis.server:

container_name : redis.server

image: 10.1.1.171:5000/eventbank/redis

network_mode: backend


activemq.server:

container_name : activemq.server

image: 10.1.1.171:5000/eventbank/activemq

network_mode: backend

ports:

- "61616:61616"

- "8161:8161"


auth.server:

image: 10.1.1.171:5000/eventbank/auth.server

container_name : auth.server

network_mode: backend

environment:

- JDBC_URL="jdbc:mysql://auth.mysql.server:3306/ebdb_auth?noAccessToProcedureBodies=true"

- JDBC_USER=ebdev

- JDBC_PASSWORD=000000

- MQ_URL="tcp://activemq.server:61616"

- MQ_USER=admin

- MQ_PASSWORD=admin

volumes:

- "/var/log/eb-auth:/var/log/eb-auth"

ports:

- "9100:9100"

- "9110:9110"

- "9120:9120"

depends_on:

- "auth.mysql.server"

- "activemq.server"


rest.server:

image: eventbank/rest.server:global-authentication

container_name : rest.server

network_mode: backend

volumes:

- "/var/log/eb-rest:/var/log/eb-rest"

depends_on:

- "rest.mysql.server"

- "activemq.server"

- "auth.server"

- "redis.server"

- "mongo.server"


nginx:

container_name: api.server

image: 10.1.1.171:5000/eventbank/nginx:1.10.0-alpine

volumes:

- "/etc/nginx/:/etc/nginx/"

- "/var/log/nginx/:/var/log/nginx/"

network_mode: backend

depends_on:

- "auth.server"

- "rest.server"

ports:

- "443:443"

- "80:80"


docker-compose