Posts

Showing posts with the label docker

Deploying Node.js Apps to AWS EC2 with Docker

Image
In this blog, we're going to create a basic Node.js app with Docker, start and configure an EC2 instance, and deploy our app to it. At the end of this blog you'll have your Node app running on AWS, and a better understanding of how to interact with a core AWS service. Prerequisites AWS Account Amazon Web Services  (AWS) is a collection of tools for building applications in the cloud. As EC2 is an AWS service, we'll need to set up an AWS account. AWS has a free tier for a lot of awesome stuff, and EC2 is no exception - you're free to use 750 hours (31 days) of EC2 a month in the free tier for a whole year. Docker Docker  allows us to bundle up our applications into small, easily deployable units that can be run  anywhere  where Docker is installed. This means no more of that 'but it works on my machine!' Node Application Let's make a really simple Node application that responds to a request. To do this, we'll open up a terminal and run: ...