Reputation: 71
What could be the best deployment pattern of an Angular front-end talking to a Java back-end, both running on Docker. What are the cons and pros of each pattern, as listed below: Angular+Java -> One container Angular -> separate container, Java -> separate container
Upvotes: 3
Views: 591
Reputation: 42946
I would strongly recommend putting your front-end and back-end in different containers, as this allows you to independently update, test, scale, and deploy the services. This is basically a "microservices" architecture, which works very will with independent Docker containers.
If you are curious to see a working example of this might look like, here is a project I worked on where we used 1 container for frontend (Angular) and 3 containers for backend (OpenLiberty/JavaEE/MicroProfile server on Java): https://github.com/liberty-bikes/liberty-bikes
Upvotes: 1