If not using docker then you are probably doing more work than you need to. For those not familiar with docker, it’s a container technology that allows an application to packaged up and run in isolation along with other applications on the same server (This is a very, very simple description just to give an overview) Once an application placed in a container it exposes just enough for the outside world to talk to it with all the complex configuration done within the container, once.
Most popular applications are available in docker containers and can be automatically downloaded and run locally.
There are 2 way you can use docker. If you use a database like MongoDB, PostgreSQL or a message queue like RabbitMQ then you’ll know that setting them up locally can be a pain, especially when they behave differently on windows and linux. Instead for installing and configuring them each time you build up a dev environment, you can create a configuration file (docker-compose.yml) that will describe how they should be setup, what ports are exposed and where files should be saved. This setup can be used by everyone and can saved hours per a developer when it comes to onboarding.
Once your infrastructure is managed you should start focusing on your own applications. This is where things start to get more complicated and you’ll need to invest more time in learning about docker, however once you get through to the other side it’s worth it. Before you start you’ll need to decide on how your containers are going to be structured, where they are going to be stored and how they will be distributed across multiple servers. For a simple monolith architecture, it’s pretty easy to migrate to docker and be up and running quickly. For more complex microservice architectures you’ll need to do a bit more planning. When you read the documentation and tutorials on docker it feels like there are only 2 scenarios, single host and swarm. The problem with it is that to go from a single host to a swarm pattern is a huge jump and overkill for a small app that may only need to scale over 2-3 servers. Luckily with a bit of creative thinking you can configure your application to run across multiple servers without the overhead of swarm management
If you are planning to scale up quickly and your budget allows for it, then I’d recommend you setup a swarm pattern. There are many tools freely available to manage swarms. Rancher is not only easy to setup and use, it also supports multiple frameworks. (the only issue I had was it had limited support for new docker-compose versions. This may no longer be the case)
The biggest problem I initially found with docker was understanding the terminology and how it would specifically help me. All the documentation and most of the tutorials seem to assume advanced networking knowledge that may beyond most developers which is a…