docker-compose安装tomcat,mariadb,redis,mongo,rabbitmq,elasticsearch.

version: '3.1'
services:
  tomcat:
    image: tomcat
    restart: always
    ports: 
      - 8080:8080
    volumes:
      - "/app/dockerwork/tomcat-webapps:/usr/local/tomcat/webapps"
  mariadb:
    image: mariadb
    restart: always
    ports:
      - 3306:3306
    volumes:
      - "/app/dockerwork/mariadb-data:/var/lib/mysql" 
    environment:
      MYSQL_ROOT_PASSWORD: ******
  redis:
    image: redis
    restart: always
    ports:
      - 6379:6379
  mongo:
    image: mongo
    restart: always
    ports:
      - 27017:27017
    volumes:
      - "/app/dockerwork/mongo-data:/data/db" 
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: ******
      ME_CONFIG_MONGODB_ADMINPASSWORD: ******
  rabbitmq:
    image: rabbitmq
    restart: always
    ports:
      - 5672:5672
      - 15672:15672
    environment:
      RABBITMQ_DEFAULT_USER: ******
      RABBITMQ_DEFAULT_PASS: ******
  elasticsearch:
    image: elasticsearch
    restart: always
    ports:
      - 9200:9200 
      - 9300:9300 
    environment:
      - discovery.type=single-node
 

你可能感兴趣的:(centos,ubuntu,docker,sublime,svn/git)