I'm planning to migrate my application stack to Docker. Let me describe the services I'm currently using:
- HAProxy, which is used for SSL termination on all service's connections (HTTP and raw TCP connections), and forwards traffic to the services below.
- Nginx, which serves static files, like updates and some information pages.
- Node.js, which runs the main applications.
- MySQL (MariaDB), the database used and shared by all the applications.
My question is about the database.
What's the proper way of running MariaDB in this case?
- Install and run it inside my container, along with the other services?
- Run the official image in a separate container, and link my container to it with the
--linkoption of Docker'sruncommand?
Does the first option have any disadvantage?
TeamSpeak docker container uses the second option and that's what made me question myself about the correct way of running the database in my case, but I particularly feel more inclined to package all the services inside my own image.
docker-composewhich would fit your case.