docker-compose 创建数据库模板

作者: root007 分类: 未分类 发布时间: 2019-09-18 17:47

pip install docker-compose

docker-compose -f docker-compose.yml up -d

version: "3.3"
services:
   apollo-db-dev:
     image: mysql:5.7
     container_name: apollo-db-dev
     volumes:
       - ./db_dev:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD: 123456
     restart: always
     ports:
        - "13306:3306"
   apollo-db-sit:
     image: mysql:5.7
     container_name: apollo-db-sit
     volumes:
       - ./db_sit:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD: 123456
     restart: always
     ports:
        - "13307:3306"
   apollo-db-uat:
     image: mysql:5.7
     container_name: apollo-db-uat
     volumes:
       - ./db_uat:/var/lib/mysql
     environment:
       MYSQL_ROOT_PASSWORD: 123456
     restart: always
     ports:
        - "13308:3306"

https://docs.docker.com/samples/library/postgres/

version: "3.1"
services:
  pg_sonardb_1:
    image: postgres:12
    restart: always
    ports:
      - 15432:5432
    environment:
      POSTGRES_PASSWORD: sonar
      POSTGRES_USER: sonar
      POSTGRES_DB: sonar
    volumes:
      - ./pg_data:/var/lib/postgresql/data

version: "3.3"
services:
 redis_uat:
    image: redis:4.0
    container_name: redis_uat
    command: redis-server --appendonly yes --requirepass passsword  
    ports:
     - "3200:6379"
    environment:
       - TZ="Asia/Shanghai"
    volumes:
     - $PWD/data:/data
     #- $PWD/redis.conf:/usr/local/etc/redis/redis.conf
version: '3.1'
services:
  mongo:
    container_name: mongo
    image: mongo:3.4
    restart: always
    ports:
      - 4001:27017
    volumes:
      - /data/mongo/data/4001:/data/db
    environment:
      MONGO_INITDB_ROOT_USERNAME: user
      MONGO_INITDB_ROOT_PASSWORD: password

MYSql8

version: "3.3"
services:
    uat-db:
     image: mysql:8.0
     container_name: uat-db-4303
     volumes:
       - ./db:/var/lib/mysql
       - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
     environment:
       MYSQL_ROOT_PASSWORD: passw0rd
     restart: always
     ports:
        - "4303:3306"

nexus3

version: "3.3"

services:
  nexus3:
    image: sonatype/nexus3
    volumes:
      - "./nexus-data:/nexus-data"
    ports:
      - "8081:8081"
  
#volumes:
# nexus-data: {}

发表评论

邮箱地址不会被公开。 必填项已用*标注


  • http://ediconcept.odns.fr/maillotdefootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher.html
  • http://ediconcept.odns.fr/maillotsfootpascher2022.html
  • https://sergiofajardo.co/maillotdefootpascher.html
  • https://sergiofajardo.co/maillotsfootballpascher.html
  • https://sergiofajardo.co/maillotsfootpascherfrance.html
  • https://allphonetoys.com/maillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotdefootpascher.html
  • https://allphonetoys.com/nouveaumaillotsdefootball.html
  • http://samosystem.nichost.ru/maillotdefootpascher.html
  • http://samosystem.nichost.ru/nouveaumodèlemaillotdefoot.html
  • http://samosystem.nichost.ru/pascherfemmesfootballjersey.html
  • http://w96397on.beget.tech/maillotdefootpascher.html
  • http://w96397on.beget.tech/pascherfootballt-shirts.html
  • http://w96397on.beget.tech/paschermaillotsdefootpromo.html
  • http://wesleywang.acsite.org/maillotdefootpascher.html
  • https://wesleywang.acsite.org/repliquemaillotsdefootballlivraisongratuite.html
  • https://wesleywang.acsite.org/retrovintagesoccerjerseys.html
  • https://www.rnkhabri.com/maillotdefootpascher.html
  • https://www.rnkhabri.com/personnaliséenfantssoccerjersey.html
  • https://www.rnkhabri.com/personnaliséfemmessoccervêtements.html
  • https://www.oujdacity.net/maillotdefootpascher.html
  • https://www.oujdacity.net/sitedemaillotdefootpascher.html
  • https://www.oujdacity.net/survetementdefoot.html
  • https://infendo.com/maillotdefootpascher.html
  • https://infendo.com/survetementdefootpascher.html
  • https://infendo.com/uniformedefootballdesjeunes.html
  • https://planitagency.com/maillotdefootpascher.html
  • https://planitagency.com/ventemaillotdefootpascherthailande2022.html
  • https://planitagency.com/vesteequipedefoot.html
  • http://immergut.com.br
  • https://immobiliarelerosemarine.com
  • https://immobilienfotografie24.de
  • http://immobilier-lemaroc.com
  • https://imobilideranca.com.br
  • https://impactdigital.space
  • https://imperibiza.com
  • https://impexworldltd.com
  • https://implant.gen.tr
  • https://impread.com
  • http://improveyourdance.com
  • http://improvisamos.com
  • http://impulsarh.com.ar
  • http://inamakethat.com
  • http://inanna.be
  • https://incomementorbox.com
  • https://incomerepairpro.com
  • https://indiatvnewss.com
  • https://indoranews.com
  • https://infendo.com
  • https://infinitebankingagenttraining.com
  • https://infinnium.com
  • http://influenceyourway.com
  • http://infocarbrokers.net
  • http://infohealth-usa.com
  • https://informatic-crew.fr
  • https://informatiotech.com
  • https://informeblumenau.com
  • https://infos-grossesse.fr
  • https://ingatlanmagus.com