I am just getting started with docker and I am trying to figure out how to deploy our webapplication. We got:
- ReactJS Webapplication & Workbench Frontend (Non-isomorph, Apache)
- Java / Wildfly Server Backend
- PostgreSQL Database
- NodeJS Websocket Server for push-notifications
My first approach was to put it all inside one ubuntu-container and just deploy that. This lead into an awefully long dockerfile so I thought that cannot be the right way and I googled best practices and came to the point that each container should have only one concern.
Does that mean that I should use one container for each of the above mentioned processes and link them, which would result in 4 running containers (the database one having a volume)?
The advantages I see right now are:
- scalability
- maintainability
- moving parts of the application to different servers / hosters is easier
The only two disadvantages I can think of are
- might get complicated linking all containers together
- (small) performance loss due to 4 containers running instead of 1 single one (and more to come for queueing, mail-server, ...)