/playground

this is an application I built to track my guitar skill development

Primary LanguageTypeScript

My Playground

This is a progress tracker for my guitar playing. I am also using it as an AWS infrastructure playground to experiment with deployment. My initial phase is to use the simplest technology to ensure deployment is successful and then gradually introduce new component depending on my needs.

Run with Docker

docker build -t playground .
docker run --rm -p 8080:8080 playground

Deployment

Deploy via Heroku

Create a new branch and switch to that branch

git branch main
git checkout main

Build the UI code

cd playgroundui
npm run build

Test the deployment locally

go build -o bin/playground -v .
heroku local

Package everything and commit

go mod tidy
go mod vendor
git add -A
git commit -m "..."
git push heroku main

Don't push it to GitHub because it's too big.

Deploy via Uploading Zip

Create a zip using git.

git archive -v -o playground-v2020.11.21.zip --format=zip HEAD

Then upload it to Elastic Beanstalk.

Deploy via AWS EB CLI

I got my AWS credentials in root directory.

eb init --profile calvinfeng

Test it locally

eb local run --port 8080

Deploy Environment

Create an environment if not exist

eb create playground-server-env

Otherwise,

eb deploy playground-server-env

Regular Deployment

Since environment name is already inside the .elasticbeanstalk folder, I can just do

eb deploy