The Master Zend Framework series has posted the third part in their series covering deployment and development setups with Docker. In this latest article Matthew Setter builds on the knowledge from the first and second parts of the series and shows how to deploy your environment to production.
In my search to learn how to use Docker as a complete solution to develop with, I've found a range of tutorials which discuss or walk through some part of the process.
Sadly, no one tutorial contains all the steps necessary to step you through containerizing an (existing) application through to deploying said application in a production environment. Given that, my aim in writing this tutorial is to show you how to do this.
The challenge in doing so, unfortunately, is that there's a lot to learn and absorb. [...] So this is going to be a lengthy post. But I've aimed to provide the most direct path to your first production deployment, as well as to structure it so that it's easy to work through or navigate to the specific part you need.
He starts off with a few prerequisites you'll need to complete the process - a DigitalOcean account, a Docker Hub account, Docker installed and working and a project to deploy. The rest of the post is broken down into a few sections to make it a bit more consumable:
- Create & Build the Container
- Store the Image in an Accessible Registry
- Build a Deployment Configuration
- Make the Deployment
For each step in the process all of the code, configurations an commands you'll need are included. In some places screenshots are also included to help you ensure you're on the right path.