Skip to content

gauravshindolkar/docker-hypercars-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Random Hyper Car"

The docker build command is quite simple - it takes an optional tag name with -t and a location of the directory containing the Dockerfile.

docker build -t gauravshindolkar/hypercar


To run the image

docker run -p 8888:5000 gauravshindolkar/hypercar


The site would be running on http://docker-machine ip:8888/

Beanstalk

AWS Elastic Beanstalk (EB) is a PaaS (Platform as a Service) offered by AWS. If you've used Heroku, Google App Engine etc. you'll feel right at home. As a developer, you just tell EB how to run your app and it takes care of the rest - including scaling, monitoring and even updates. In April 2014, EB added support for running single-container Docker deployments which is what we'll use to deploy our app. Although EB has a very intuitive CLI, it does require some setup, and to keep things simple we'll use the web UI to launch our application.

To follow along, you need a functioning AWS account. If you haven't already, please go ahead and do that now - you will need to enter your credit card information. But don't worry, it's free and anything we do in this tutorial will also be free! Let's get started.

Here are the steps:

  • Login to your AWS console.
  • Click on Elastic Beanstalk. It will be in the compute section on the top left. Alternatively, just click here to access the EB console.
  • Click on "Create New Application" in the top right
  • Give your app a memorable (but unique) name and provide an (optional) description
  • In the New Environment screen, choose the Web Server Environment.
  • The following screen is shown below. Choose Docker from the predefined configuration. You can leave the Environment type as it is. Click Next.
  • This is where we need to tell EB about our image. Open the Dockerrun.aws.json file located in the flask-app folder and edit the Name of the image to your image's name. Don't worry, I'll explain the contents of the file shortly. When you are done, click on the radio button for "upload your own" and choose this file.
  • Next up, choose an environment name and a URL. This URL is what you'll share with your friends so make sure it's easy to remember.
  • For now, we won't be making changes in the Additional Resources section. Click Next and move to Configuration Details.
  • In this section, all you need to do is to check that the instance type is t1.micro. This is very important as this is the free instance by AWS. You can optionally choose a key-pair to login. If you don't know what that means, feel free to ignore this for now. We'll leave everything else to the default and forge ahead.
  • We also don't need to provide any Environment Tags and Permissions, so without batting an eyelid, you can click Next twice in succession. At the end, the screen shows us the Review page. If everything looks good, go ahead and press the Launch button.
  • The final screen that you see will have a few spinners indicating that your environment is being set up. It typically takes around 5 minutes for the first-time setup.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published