This repository maintains an example template for spring boot netflix cloud microservice architecture.
- Eureka Server
- Performs Service Registry
- API-Gateway
- Provide Gateway endpoints
Docker by default create a bridge network for same host container. Here we are creating a user network and provide alias for each services.
docker network create spring-boot-microservices
- Build using
docker build
command .
docker build --build-arg artifactId="eureka-server" --build-arg version=0.0.1-SNAPSHOT -t eureka-server:latest .
- Run using
docker run
command .
docker run -d -p8761:8761 --network spring-boot-microservices --network-alias eureka --name eureka-server eureka-server
- Build using
docker build
command .
docker build --build-arg artifactId="api-gateway" --build-arg version=0.0.1-SNAPSHOT -t api-gateway .
- Run using
docker run
command .
docker build --build-arg artifactId="api-gateway" --build-arg version=0.0.1-SNAPSHOT -t api-gateway .
- Build using
docker build
command .
docker build --build-arg artifactId=resource-server --build-arg version=0.0.1-SNAPSHOT -t resource-server .
- Run using
docker run
command .
docker run -d -p8081:8081 --network spring-boot-microservices --network-alias api-gateway --name resource-server resource-server