This week I’ve been planning out the new Docker series. There’s a ton of stuff to cover, and I’m not sure whether to start out with the very basics, or dive right into the difficult stuff. One possibility is to split it into two (or more) course, covering different levels of detail.
What I am planning on covering is how to deploy the sort of stack that a small site might need. This includes:
- Symfony 3
Being that I love Symfony, it’s probably unsurprising that we are going to use Symfony 3 as the example back end. But in truth, you could swap this part out for anything you like. Hopefully with some of the problems we will encounter in getting a Symfony site online using Docker, then other similar setups will be covered with only minimal modification to the process.
Then if you go with this, you’d probably want a separate front end site, so:
The MySQL and nginx containers would be completely different from the Symfony stack ones.
That brings up another issue then – sharing ports. You’re going to hit on issues if you try and re-use port 80 for serving two different nginx containers. At least, I did.
The solution to this is using a Load Balancer. So we will cover this too.
With a load balancer in place, we will add in LetsEncrypt to give us free SSL. This will cover both the Symfony stack and the WordPress stack.
But wait, there’s more.
We probably want a separate front end stack also. For the app that talks to our Symfony 3 API stack. So we will need to setup this too.
There’s a bunch of fun challenges in each one of these steps. And by fun I mean “will cost you hours of your life” kinds of fun. Even simple stuff that you likely take for granted can bite you – e.g. how might you run a cronjob in Docker-land?
Lastly, all of these services would be fairly painful without some kind of deployment pipeline. Thankfully, GitLab has us covered here, so we will also need to add a GitLab instance into our stack. Again, this will be dockerised.
Oh, and managing this would be a total nightmare without some kind of container orchestration software. We will be using Rancher.
So, yeah. Plenty to cover 🙂
But as I say, plenty to cover and that’s without mentioning the basics.
In other news this week (and some of last), there’s a really interesting read around the forthcoming release of Symfony 4 – (start here http://fabien.potencier.org/symfony4-compose-applications.html)
I really like the direction that Symfony 4 sounds like it’s taking. I cannot wait to try out Symfony Flex. I’m even going to get back to using Makefiles by the sound of things – though I can’t say I was in love with them the last time I had to use them. That was years ago, mind.
This week saw four new, free videos added to the site.
These videos start here:
And are all part of the same course. This series is a slower paced introduction to Symfony 3, aiming to cover in a little more depth the big questions I had when first starting with Symfony in general.
Whilst we have covered how to create a simple Contact Form before on CodeReviewVideos, this time we are going to use it as the basis for a slightly more interesting series. Once we’ve built the contact form and had a play around with some extra things you might wish to do with it, we are going to move on and secure the contact form.
This will involve implementing some basic user management features – but crucially we are going to do so without resorting to FOSUserBundle.
Now, don’t get me wrong here. I think FOSUserBundle is fantastic and am extremely grateful for its existence. But you may have jumped in and added FOSUserBundle without ever taking the time to figure out how to implement login and registration for yourself. And so this series will aim to cover this.
Ok, that just about covers it from me this week.
Thanks to everyone who has been in touch since last week. I truly appreciate your feedback.
Until next week, have a great Easter Weekend, and happy coding.