consul config agent
$ export ENV_KEY_NAME=${your config key}
$ export CONSUL_HTTP_ADDR=${your consul address}
$ docker-compose up
# then change the config and restart docker-compose
# start agent
$ docker run --name config-agent -d -e "ENV_FILE=.test-env" -e "ENV_KEY=${ENV_KEY_NAME}" -e "ENV_UPDATE_INTERVAL=10" -e "CONSUL_HTTP_ADDR=${CONSUL_HTTP_ADDR}" -e "ENV=debug" -v `pwd`/.test-env:/opt/.test-env zcong/config-agent:latest
# start app
$ docker build -t test-app .
$ docker run --env-file .test-env test-app
# then change the config and restart app
MIT © zcong1993
Content type
Image
Digest
Size
14.3 MB
Last updated
over 8 years ago
docker pull zcong/config-agent