You’ll often need to execute various administrative or maintenance tasks for your app, such as database migrations or arbitrary console commands.
In this lesson, we will learn how to run arbitrary one-off commands as disposable Docker containers.
Interesting course, this one will need to be watched and referenced over and over to absorb all of the good stuff.
Thank you, I agree some of these concepts need repetition in order for them to sick.
Great course @Mark. I like the load-balancing with nginx part. I was hoping to see how to use nginx as proxy and setup https with letsencrypt. It has proven to be hard to do. Thanks again for this.
Thanks! FYI I have more Docker lessons at:
https://egghead.io/instructors/mark-shust
I actually have a lesson directly pertaining to setting up an nginx proxy:
https://egghead.io/lessons/setup-an-nginx-proxy-for-a-node-js-app
Proxies aren't a part of 12-factor apps (but... maybe they should be!), so I left it out of this course. Thanks for the recommendation, I always used to have a hard time figuring out proxies.
For lets encrypt, at least for non-Docker setups I would highly recommend Certbot. I hope to have a lesson out soon on using certbot/letsencrypt with Docker, as it's been notoriously difficult to set that up.
How to run tasks in development that modify the codebase? For example, I'd like to run yarn add <package-name>
without installing yarn on my local machine. I'd like to run it in the container (same environment as my app runs). However, the changes to package.json
and yarn.lock
have to be applied to my codebase on my local machine.
@Michael, maybe a volume mapping to the codebase directory would help. But you'll need to remove the mapping to your local node_modules
directory in docker-compose.yml.
Then execute docker-compose exec <service-name> commands
this course is a little scattered. seems more like a collection of loosely related lessons than a cohesive course :/
I agree -- it's the best I could do with 12-factor, and covering one video per lesson, otherwise this would have been a 30+ lesson course. I'm hoping to cover Docker basics in another course. I'm still hoping this course is very useful though to understand the base concepts of 12-factor apps.
I'm hoping to cover Docker basics in another course.
I don't know if you assembled the following playlist of your videos or not, but I found it extremely helpful for answering that exact need: https://egghead.io/playlists/docker-fundamentals-0cb53b55. In my opinion this playlist serves as a de facto "Getting Started with Docker" course.