Spring Microservices and Docker
This example shows how to create a microservices architecture with Spring Boot and Spring Cloud. It also shows how to package each application in Docker containers and run them with Docker Compose.
Please read Build Spring Microservices and Dockerize them for Production for a tutorial that shows you how to build this application.
Prerequisites: Java 8 or 11.
Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage and secure users and roles in any application.
To install this example application, run the following commands:
git clone https://github.com/oktadeveloper/okta-spring-microservices-docker-example.git cd okta-spring-microservices-docker-example
Create an Okta Developer Account
If you don't have one, create an Okta Developer account. After you've completed the setup process, log in to your account and navigate to Applications > Add Application. Click Web and Next. On the next page, enter a name for your app (e.g., "Spring Docker"), then click Done.
Copy your issuer (found under API > Authorization Servers), client ID, and client secret into
Create another Web application and name it something like "Spring Docker Production". Copy the client ID and secret into
Run the following command from the root folder to create Docker containers for all your apps.
./mvnw clean install
Then you can start your microservices architecture using Docker Compose:
docker-compose up -d
TIP: You can use Kitematic to view your container logs and make sure everything starts OK.
After everything starts, you should be able to log in with your credentials at
This example uses the following open source projects:
Apache 2.0, see LICENSE.