Deploying microservices in a Docker container

We will now deploy the CourseManagement microservice that we created earlier in this chapter (the one using WildFly Swarm) in a Docker container. You can either copy the project and paste it in Eclipse Project Explorer with a different name, or use the same project. The example code has a project called coursemanagement-docker for this section.

We need to make one change in persistence.xml. Recall that in our earlier example, the JDBC URL in this file referred to 127.0.0.1 or localhost. This worked then because both the application and the database were running in the same environment. But now our database and application are going to run in separate Docker containers, with isolated runtime environments. ...

Get Java EE 8 Development with Eclipse now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.