Dockerize and orchestrate your fullstack MEAN app easily

Turhan Oz
8 min readApr 27, 2019

In the era of cloud services on demand, you may ask : why bothering to dockerize your app while you can deploy your frontend on a static AWS S3 hosting, your backend on lambdas, your API on AWS API gateway and your database on RDS ? Simply because it’s worth knowing how easy it is to actually create a fullstack app and deploy it all on a single hosting using docker compose orchestration.

For my side projects, I’m using a very basic hosting provider which is a dedicated server for less than few bucks a month running ubuntu server. I like using it to test side projects and for conveniency, I dockerize all the components and use docker compose to orchestrate all the containers. The main goal here is to deploy quickly your app for testing and experimenting on the field, rather than dealing with distributed services. Once you extract the value of your experiment and you see tractions for your app, then switching to other architecture is of course worthful.

In this article, we will cover
1. how to create and dockerize a MEAN app
and 2. How to orcherstrate all services using docker-compose

Even though I will add some code snippet for each element of the technical stack, the focus will be mainly given on the docker part. This means that you should be familiar with mysql, angular and nodeJS and have all dependencies already installed (node, npm, angular-cli).

Pre-requisite

--

--