Creating a DigitalOcean Cluster

Before we can deploy our app to the cloud, we need cloud-based instances on which to deploy it. We’re going to start by creating a Docker swarm on DigitalOcean. The prices[123] are very modest: $0.007 per hour for the smallest, standard Droplet—their term for an instance. In real terms, a three-node cluster running for 48 hours will cost $1.

To follow along, you’ll need your own DigitalOcean account. Go to the DigitalOcean homepage and complete the sign-up form.[124] You’ll need to enter your credit card details, since there is a charge for using their cloud resources.

Once you’ve created an account, you’ll need to generate an API token so that you can set up infrastructure from the command line. Log in and navigate ...

Get Docker for Rails Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.