/practicelog

it tracks the number of hours I've spent on developing my guitar skill

Primary LanguageTypeScript

Practice Log

CircleCI

Usage

go install
practicelog db reset
practicelog db migrate
practicelog db seed
practicelog practiced "<label name>"

Docker

Build it

docker build -t practicelog .

Run it

docker run --rm -p 8080:8080 practicelog

Heroku

Setup

Heroku CLI creates git remote named heroku automatically. It also lets Heroku to auto detect app name.

App commands are typically executed from within an app’s local git clone. The app name is automatically detected by scanning the git remotes for the current working copy

heroku git:remote -a guitar-practice-log

Deploy

Create a new branch and switch to that branch

git branch main
git checkout main

Build the UI code

cd practicelogui
npm run build

Test the deployment locally

go build -o bin/practicelog -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.

Check DB Connection Credentials

heroku config

Then use the connection URL and psql into it directly.

psql <connection URL>