迁移apollo数据库之后部署apollo

version: '3'
services:
  apollo-configservice:
    image: apolloconfig/apollo-configservice:2.2.0
    container_name: apollo-configservice
    restart: always
    network_mode: host
    environment:
      - SPRING_DATASOURCE_URL=jdbc:mysql://xxxxxx:3306/apolloconfigdb?characterEncoding=utf8
      - SPRING_DATASOURCE_USERNAME=apollo
      - SPRING_DATASOURCE_PASSWORD=xxxxxxx
      - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0 #防止注册成容器内部Ip
      - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.*
      #- EUREKA_INSTANCE_IP_ADDRESS=192.168.100.172
      #- EUREKA_INSTANCE_HOME_PAGE_URL=http://192.168.100.172:8080
      #- EUREKA_INSTANCE_PREFER_IP_ADDRESS=false

    volumes:
      - /tmp/logs/configservice:/opt/logs

  apollo-adminservice:
    image: apolloconfig/apollo-adminservice:2.2.0
    container_name: apollo-adminservice
    network_mode: host
    environment:
      - SPRING_DATASOURCE_URL=jdbc:mysql://xxxxx:3306/apolloconfigdb?characterEncoding=utf8
      - SPRING_DATASOURCE_USERNAME=apollo
      - SPRING_DATASOURCE_PASSWORD=xxxxx
      - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0 #防止注册成容器内部Ip
      - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.*
      #- EUREKA_INSTANCE_IP_ADDRESS=192.168.100.172
      #- EUREKA_INSTANCE_HOME_PAGE_URL=http://192.168.100.172:8080
      #- EUREKA_INSTANCE_PREFER_IP_ADDRESS=false
    volumes:
      - /tmp/logs/adminservice:/opt/logs
  apollo-portal:
    image: apolloconfig/apollo-portal:2.1.0
    container_name: apollo-portal
    network_mode: host
    environment:
      - SPRING_DATASOURCE_URL=jdbc:mysql://xxxx:3306/apolloportaldb?characterEncoding=utf8
      - SPRING_DATASOURCE_USERNAME=apollo
      - SPRING_DATASOURCE_PASSWORD=xxxx
      - APOLLO_PORTAL_ENVS=dev
      - dev_meta=http://localhost:8080
      - pro_meta=http://localhost:8080
     # - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[0]=docker0
     # - SPRING_CLOUD_INETUTILS_IGNORED_INTERFACES[1]=veth.*
 
    volumes:
      - /tmp/logs:/opt/logs
        #- ./config:/apollo-portal/config

 

posted @ 2024-07-23 14:07  力王7314  阅读(38)  评论(0编辑  收藏  举报