Angular Front-end, Java Back-end best deployment pattern on Docker

DonKariro :

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

Andy Guibert :

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=158790&siteId=1