Social media app based around cocktails. Find and share your favorite cocktails with your friends!
Scales using AWS Auto Scaling Groups with an application load balancer. The application infrastructure is defined with Terraform and AMIs are built using Packer.
- Enter the
client/
directory - (Optional) export
REACT_APP_BACKEND_HOST
to use a non-dev backend. Will default tolocalhost:8080
. - Run
npm run build
Built files will be in client/build/
- Install
maven
. Check that you have it withmvn --version
- Enter the
server/
directory - Run
mvn package
Executable jar will be in server/target/****.jar
Make sure that you have AWS configured locally. You should have the aws
cli executable and your credentials set up.
- Go to
infra/packer
- Run
packer build -on-error=ask packer-image.json
- Take note of the ami id reported by packer
- Go to
infra/terraform
- Create SSH keys so that you can connect to your SSH instances
(for troubleshooting)
ssh-keygen -t rsa -m PEM
- Rename the file
vars.tfvars.example
->vars.tfvars
and set the variables - Run
terraform plan -var-file=vars.tfvars -out <plan_name>
and thenterraform apply <plan_name>
- Make sure that you have built the frontend with the backend host environment variable
- Find the name of the S3 bucket generated from the previous step
- Copy over the build files with
aws s3 cp client/build s3://<bucket_name> --recursive