Code Monkey home page Code Monkey logo

ec2_node_server's Introduction

Setup

Setup environment variables

Create env.bat/.sh file and fill in all the variables

@set AWS_ACCESS_KEY_ID=
@set AWS_SECRET_ACCESS_KEY=
@set AWS_DEFAULT_REGION=us-west-2
@set TF_VAR_aws_private_key_file_path=.\\aws_key.pem
@set TF_VAR_ec2_user="ec2-user"

Create aws_key.pem file in the top level directory of the project and add your private key that you will be using to connect to the ec2 instance with. Make sure your key is added to your key pairs in the ec2 instances page of your AWS account.

Running terraform

Install terraform

Run:

env.bat
terraform init
terraform plan
terraform apply

Running the node server

Install docker Start docker vm

docker-machine start
docker-machine env

Build and run the docker container

docker build -t ec2server .
docker run -d -p 8080:8080 --name=ec2server ec2server

The docker machine runs on 192.168.99.100 so you can hit the server like this

curl 192.168.99.100:8080

ec2_node_server's People

Contributors

bsgrigorov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.