chronicles

command module
v0.0.0-...-6a1111e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2025 License: MIT Imports: 1 Imported by: 0

README

chronicles

https://bit.ly/bb-chronicles-dd

Development Environment

In local dev env we use docker-compose to have our dependencies setup for us.

Fire up all services

docker-compose up -d

CLI access to local dev db

docker-compose exec db psql -U user -d chronicles
Production Environment

Once you have ssh access to production server you could:

CLI access to production db

cd /opt/chronicles
docker-compose exec db psql -U chronicles

Application logs

cd /opt/chronicles
docker-compose logs -f app
Try out the API

To try out authenticated endpoints on your local environment set the SKIP_AUTH=true environment variable. This will allow every request to any endpoint.

However, on production, you must send a valid Authorization header. You can get one by inspecting network traffic in browser after login in. Copy paste the value of the Authorization header and use that.

DB Migrations

DB Migrations are managed by migrate

On mac install with brew. For other platforms see the project homepage.

brew install golang-migrate

Create a new migration by

migrate create -ext .sql -dir migrations -format 20060102150405 <migration_name_goes_here>

Run migrations

migrate -database "postgres://user:password@localhost/chronicles?sslmode=disable" -path migrations up

Regenerate models

sqlboiler psql

Download instructions for sqlboiler can be found here.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL