Deploy web apps with Docker
$12.99
Minimum price
$16.99
Suggested price

Deploy web apps with Docker

Rescue yourself from the complexity of DevOps

About the Book

Docker allows you to package an application with all of its dependencies into a standardized unit for software development. This is an excellent way to ensure what works on your machine will work in production too. This book will explain how to get situated with Docker on your workstation, how to create a Dockerized version of your web application in development mode and get it working in production.

After you finish the book you will have a solution that lets you git push code to a staging or production server and have everything like service restarts and more happen automatically. You can sit back and relax while the code we've written does all the work.

We will even go over signing up for a cloud hosting provider, registering a domain name and hooking up a free SSL certificate so you can safely serve the contents of your website to your visitors.

There are a number of code examples included and the final result is a fully working solution that you can apply to your next project. The emphasis is on Docker, not a specific web programming language or framework. You will easily be able to apply everything here to your favorite language or framework.

Save yourself from months of painful research and testing. You're only a few short hours away from having a robust and dependable deployment solution at your disposal.

About the Author

Nick Janetakis
Nick Janetakis

Nick Janetakis is a full stack developer who also happens to be a technology enthusiast. He contributes to a number of open source projects and helps companies bring their ideas to life by developing and deploying solutions for them.

Reader Testimonials

Alec Reiter
Alec Reiter

I came in with no Docker knowledge and in less than 55 pages I walked away with something much more than a hello world example. I'm going to recommend this book to my friends, it's extremely well put together.

Josh Flinner
Josh Flinner

This book was easy to follow and understand. I had minimal knowledge with Docker, now I feel more confident in using Docker for my web apps. I will recommend this to those wanting to use Docker.

Table of Contents

  • Getting to know Docker and CoreOS
    • What is Docker and why should you use it?
    • What is CoreOS and why should you use it?
  • What are we going to build?
    • Overview of the technology stack
    • Example web application architecture
    • What if you want to dial it down?
  • Get your workstation running Docker
    • Are you using Windows, Mac or Linux?
    • Windows users
    • Mac users
    • Linux users
    • Install additional tools
    • Sanity check
  • Create the demo application
    • Set up the project directory structure
    • Set up the Flask application
    • Dockerize the Flask application
    • Introduce Redis to our Flask application
    • Moving beyond a trivial application
    • Let’s make a git repository
    • Sanity check
  • Create a staging environment
    • Going from development to production is risky
    • What should we use to host our staging environment?
    • What is Vagrant?
    • Install Vagrant
    • The Vagrantfile
    • Launch, test and stop the Vagrant driven VM
    • Update our ignore files
    • Sanity check
  • Crash course with systemd
    • What is systemd?
    • Create our first unit file
    • Get used to systemd’s command line tools
    • A second unit file for our Flask application
    • Sanity check
  • Harden the Flask app with nginx
    • What is nginx and why should you use it?
    • nginx is just another unit file
    • Create a custom nginx Docker image
    • Sanity check
  • Test drive our staging server
    • Get the code onto the server
    • Create the git hooks
    • Going back to the Vagrantfile
    • Launch a new Vagrant box
    • Sanity check
  • Create a production server
    • How will we host the application?
    • Sign up with Digital Ocean
    • Prepare your droplet
    • Secure your droplet
    • Sanity check
  • Register a domain name
    • Accessing your server by IP address is lame
    • Configure your domain
    • Configure your e-mail
  • Grab a legit SSL certificate
    • A rant on SSL certificate vendors
    • Signing up with StartSSL
    • Backup your server certificates in a safe place
    • Copy your new certificates to the production server
    • Verify that it works and is graded A+
  • Wrapping things up
    • Where to go next for Docker knowledge?
    • Want to learn more about Flask?

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub