From 2e281d969237495675ba7d907388b887875e6605 Mon Sep 17 00:00:00 2001 From: rumd3x Date: Sun, 6 Oct 2019 15:34:25 -0300 Subject: [PATCH] finished project Signed-off-by: rumd3x --- Dockerfile | 2 ++ README.md | 5 +++-- docker-compose.yml | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0fb18e4..ca553de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] diff --git a/README.md b/README.md index 403d20f..826b9c3 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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`. diff --git a/docker-compose.yml b/docker-compose.yml index b4b9036..06043e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: unicorn: - # build: ./ - image: "containous/whoami" + build: ./ + # image: "containous/whoami" networks: - load-balancer restart: always