Docker部署Apollo配置中心 (3)

最后附上完整的apollo-compose.yaml文件凑凑字数:

#坑一: mysql使用有对象设置环境变量无效 version: "3" services: mysql-dev: image: mysql # restart: always environment: - MYSQL_ROOT_PASSWORD=123456 expose: - "3306" volumes: - /Users/yjwfn/bin/apollo/scripts/sql:/sql apollo-configservice-dev: image: harbor.rcntech.cn/apollo/apollo-configservice:v1.2.0 environment: DATASOURCES_URL: jdbc:mysql://mysql-dev:3306/ApolloConfigDB?characterEncoding=utf8 DATASOURCES_USERNAME: root DATASOURCES_PASSWORD: 123456 ENV: "dev" expose: - "8080" depends_on: - "mysql-dev" apollo-adminservice-dev: image: harbor.rcntech.cn/apollo/apollo-adminservice:v1.2.0 environment: DATASOURCES_URL: "jdbc:mysql://mysql-dev:3306/ApolloConfigDB?characterEncoding=utf8" DATASOURCES_USERNAME: root DATASOURCES_PASSWORD: 123456 ENV: "dev" expose: - "8080" depends_on: - "mysql-dev" - "apollo-configservice-dev" mysql-portal: image: mysql # restart: always environment: - MYSQL_ROOT_PASSWORD=123456 expose: - "3306" volumes: - /Users/yjwfn/bin/apollo/scripts/sql:/sql apollo-portal: image: harbor.rcntech.cn/apollo/apollo-portal:v1.2.0 environment: DEV_META_SERVICE_NAME: apollo-configservice-dev DATASOURCES_URL: "jdbc:mysql://mysql-portal:3306/ApolloPortalDB?characterEncoding=utf8" DATASOURCES_USERNAME: root DATASOURCES_PASSWORD: 123456 ports: - 8070:8070 depends_on: - "mysql-portal" - "apollo-configservice-dev" - "apollo-adminservice-dev"

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpzwjz.html