Cloud servers provides developers (Spring Boot ones) the ability to quickly test microservices with 'cloud' services such as configuration and eureka. The aim of this project isn't to teach what each service is/or what it does as I'm sure there are much better sources for this.
Each module (Maven) can run independently using the ./run.sh script. In order to simplify the entire process each of the services has been dockerized and a simple docker-compose file has been added. So you have three options for running these services:
- ./run.sh in each module
- docker run imamchishty/XXXX-server
- docker-compose
The preferred option is to use docker-compose as it is extremely simple.
The docker-compose file is available at the root of this project. It's a very simple yaml file that combines multiple docker images to run seamlessly.
For the config-server you're required to pass the location, directory location, of where the config files for the apps reside. In future I'll add an option for github, but to keep it really simple I've opted for files on the filesystem.
To make the env variable available to docker-compose please create a .env
file and keep this in the same location as docker-compose.yaml.
Set the following values:
CONFIG_SERVER_CONFIG_DIR=/your/config/folder/location
docker-compose up
optional -d
can also be used.
The following lists the services that will be available.
Run examples have been provided, to run detached use the -d
switch.
Image: imamchishty/config-server Run: docker run -p 8070:8070 -e "CONFIG_DIR=/config/" -v /config/:/config/ imamchishty/config-server Url: localhost:8070
Image: imamchishty/eureka-server Run: docker run -p 8071:8071 imamchishty/eureka-server Url: localhost:8071
Image: imamchishty/zuul-server Run: docker run -p 8072:8072 imamchishty/zuul-server Url: localhost:8072
Image: imamchishty/turbine-server Run: docker run -p 8073:8073 imamchishty/turbine-server Url: localhost:8073
Image: imamchishty/zipkin-server Run: docker run -p 9411:9411 imamchishty/zipkin-server Url: localhost:9411
Please refer to the compose-file.