I’m relatively new to docker and am struggling to get my head around how it is supposed to be implemented.
I’ve been doing a course on Pluralsight and it’s confused me a little. When I downloaded the source files for the course, all the code for the Database, Web API and Web App were part of the same folder structure.
I’ve been under the impression that Docker helps to decouple your architecture. Taking the MEAN stack as an example I would expect this to translate into 3 services (images):
- A service for the database
- A service for the Node API
- A service for the Angular App and Web Server
Logically (at least to me) that would translate to 3 separate repos on Github. I’ve drawn what I think this should look like. The flow is:
- Developer pushes changes to GitHub
- CI process checks that tests pass etc…
- CI process triggers build on DockerHub
- CI process pushes image changes to Dev Environment
I’ve read up a bit on docker compose and have seen how this can help speed up deployment of a micro service architecture in non-prod environments. But if the project structure is as defined above, where abouts would the docker-compose.yml file sit?
Apologies for the length of the post, just trying to sort out the fundamentals in my head. To sum up I’m asking:
- Does the flow / architecture I’ve drawn in the diagram make sense for a MEAN stack web app?
- What should the folder structure look like for the micro service architecture? Should all the services be separated into their own git repos? If so, where does the docker-compose.yml file sit?
Appreciate all / any help you can give.