传统运维 - Apollo公网访问
2024-08-27
适用于office与云内网非互通场景
#!/bin/bash
db="dev-aigc-rds-.upushnkt.ap-southeast-1.rds.amazonaws.com"
user="root"
password="nY59B%SKD"
version=1.9.1
eip="13.222.143.90"
docker kill apollo-configservice apollo-adminservice
docker rm apollo-configservice apollo-adminservice
docker run --net=host \
-e SPRING_DATASOURCE_URL="jdbc:mysql://${db}:3306/DevApolloConfigDB?characterEncoding=utf8" \
-e SPRING_DATASOURCE_USERNAME=${user} -e SPRING_DATASOURCE_PASSWORD=${password} \
-e EUREKA_INSTANCE_IP_ADDRESS="${eip}" \
-d -v /opt/logs:/opt/logs --name apollo-configservice apolloconfig/apollo-configservice:${version}
docker run --net=host \
-e SPRING_DATASOURCE_URL="jdbc:mysql://${db}:3306/DevApolloConfigDB?characterEncoding=utf8" \
-e SPRING_DATASOURCE_USERNAME=${user} -e SPRING_DATASOURCE_PASSWORD=${password} \
-e EUREKA_INSTANCE_IP_ADDRESS="${eip}" \
-d -v /opt/logs:/opt/logs --name apollo-adminservice apolloconfig/apollo-adminservice:${version}