Skip to content

Commit

Permalink
finished project
Browse files Browse the repository at this point in the history
Signed-off-by: rumd3x <[email protected]>
  • Loading branch information
rumd3x committed Oct 6, 2019
1 parent 5536257 commit 2e281d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=1 CMD curl

ADD ./bins/server /server

RUN chmod +x /server

EXPOSE 80

CMD [ "/server" ]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# aws-gameday-unicorn

Optimal solution for AWS Gameday Ep.6 (Unicorn Rentals) challenge
Optimal solution for AWS Gameday Ep.6 (Unicorn Rentals) challenge.

## How to use

Expand All @@ -10,10 +10,11 @@ Optimal solution for AWS Gameday Ep.6 (Unicorn Rentals) challenge
- Run `terraform apply` to create the needed infrastructure.

- Login into your EC2 instance via SSH using `ssh -i key.pem [your.instance.ip.here] -l ubuntu`
- Configure a Swap partition on your EC2 Instance (Recommended 8GB or More).
- **IMPORTANT:** Configure a Swap partition on your EC2 Instance (Recommended 8GB or More).
- Inside your EC2 instance install docker and docker-compose `sudo apt update && sudo apt install docker.io docker-compose`
- Clone this project inside your EC2 instance `git clone https://github.com/rumd3x/aws-gameday-unicorn.git`
- Start the service by running `sudo docker-compose up -d --build --force-recreate --scale unicorn=8`
- Now take your CloudFront Domain Name and put it on your AWS GameDay Dashboard.

- When the time comes, edit the `Dockerfile` changing the line `ADD ./bins/server /server` to `ADD ./bins/server2 /server`.
- Stop the services with `sudo docker-compose stop`.
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:


unicorn:
# build: ./
image: "containous/whoami"
build: ./
# image: "containous/whoami"
networks:
- load-balancer
restart: always
Expand Down

0 comments on commit 2e281d9

Please sign in to comment.