[![Build Status](CI_BADGE_URL goes here)](REPO_URL goes here)
An amazing Mark Golang IC!
- Go - 1.20 or newer
To start the development server, .env
file must be created.
- Copy
.env.example
file and rename to.env
-
air
is used for live reloading -
goose
is used for database migration. -
forego
manages Procfile-based applications.
They need to be built as a binary file in $GOPATH
.
make install-dependencies
make dev
The application runs locally at http://localhost:8080
Execute all unit tests:
make test
make migration/create MIGRATION_NAME={migration name}
make migration/status
make db/migrate
make db/rollback
- Heroku CLI latest version
- Terraform
To deploy the application to Heroku with Terraform, we need to create the Heroku API Key first:
$ heroku login
$ heroku authorizations:create --description <api key description>
And then, move to the deploy/heroku
folder and run the following steps:
Step 1: Copy the variable file and update the variables
$ cp terraform.tfvars.sample terraform.tfvars
You can get the tfvars
files from 1Password
Step 2: Initialize Terraform
$ terraform init
Step 3: Generate an execution plan
$ terraform plan -var-file="terraform.tfvars"
Step 5: Execute the generated plan
$ terraform apply -var-file="terraform.tfvars"
Step 6: Build the application and push to heroku
You can check .github/workflows/deploy.yml
workflow for more details
Make sure you set the following Github secrets before deploying the application:
HEROKU_ACCOUNT_EMAIL # Heroku email
HEROKU_API_KEY # Heroku OAuth token
HEROKU_APP_NAME_PRODUCTION # Heroku app name for production
HEROKU_APP_NAME_STAGING # Heroku app name for staging