Skip to content

ujagrati/Docker-EBeanstalk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

2048 Game Deployment on AWS Elastic Beanstalk

This repository contains the necessary files and instructions to deploy a Dockerized version of the 2048 game on AWS Elastic Beanstalk. The 2048 game is a single-player sliding tile puzzle game created by Gabriele Cirulli.

Prerequisites

Before you begin, ensure you have the following:

  • AWS CLI configured with appropriate IAM permissions
  • Docker installed on your local machine
  • AWS Elastic Beanstalk CLI (EB CLI) installed
  • An AWS account

Setup Instructions

  1. Clone the Repository:
git clone https://github.com/your-username/2048-game-deployment.git
cd 2048-game-deployment
  1. Dockerize the Application:

Ensure you have a Dockerfile in the project directory.

  1. Build the Docker Image:
 docker build -t 2048-game .
  1. Run the Docker Container Locally (Optional):
 docker run -p 80:80 2048-game

Visit http://localhost to see the 2048 game running locally.

Deployment

  1. Create an Elastic Beanstalk Application and Environment:
 aws elasticbeanstalk create-application --application-name 2048-app --description "2048 Game Application"
aws elasticbeanstalk create-environment --application-name 2048-app --environment-name 2048-env-1 --solution-stack-name "64bit Amazon Linux 2 v3.8.2 running Docker" --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=IamInstanceProfile,Value=aws-elasticbeanstalk-ec2-role
  1. Deploy the Application:

Initialize your Elastic Beanstalk repository and deploy the application.

 eb init -p docker 2048-app
eb create 2048-env-1
  1. Deploy your Docker image:
eb deploy
  1. Access the Application:

Once deployed, Elastic Beanstalk will provide a URL to access your application. Visit the URL to play the 2048 game.

Cleanup

To clean up your AWS resources and avoid incurring charges:

  1. Terminate the Elastic Beanstalk Environment:
eb terminate 2048-env-1
  1. Delete the Elastic Beanstalk Application:
aws elasticbeanstalk delete-application --application-name 2048-app --terminate-env-by-force 

Reference Images

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published