This project is part of a personal development plan.
This will simulate the deployment of an EC2 in a local environment. To achieve this, perform the following steps.
-
- Make
- Docker & docker-compose
$ cp .env.local.example .env
$ docker-compose up -d
$ make docker-infraThe make docker-infra command will get you into the container where the deploy steps will be performed.
$ make deployOnce the deploy is finished, go to http://localhost:8080/quotes to see the output of the deployed project in action.
You can also make an SSH connection to the EC2 machine (AMI) that is running in the local environment, for that, run the following command:
$ ssh ec2-user@172.20.0.10Use the password: testec2
To end the deployed infrastructure, run:
$ cd deployment/terraform; terraform destroyThis is one of many other ways to deploy an EC2 instance, and in my opinion there are better ways than this, but it was worth the proof of concept for the knowledge gain. :)