I’ve been playing around with Docker and am just trying to get my head around how to convert some of my existing apps to docker containers in a swarm.
Say for example I had a simple 3 tier web app, consisting of a web front end, an API layer and a DB backend, where only the web front end was exposed externally. I’m just trying to get my head around how best to set things like this up in Docker containers in a swarm to allow for multiple instances of containers for load balancing.
Is it best to create a Docker compose file, detailing all containers of the application, or better to think about them a seperate services that can be setup seperately?
Any advice about exposing access to web front ends only, and blocking access directly to the API and DB containers from outside the swarm? I haven’t looked at the networking features of Docker yet, so guess thats the best place to start!
Any advice/best practice guidelins appreciated!