Skip to content

mkblog-dev/platform

Repository files navigation

Setup

Instructions assume you are on unix-like system.

Environment variables

Create .env file from example.env.

cp example.env .env

You can use any name for the DB file; .gitignore excludes all *.db files from git tracking.

DB_SOURCE_NAME and GOOSE_DBSTRING must point to the same file

GitHub integration

  • Generate app client secret and store it in the GH_CLIENT_SECRET variable.
  • Generate private key and put it into pem directory (or any other directory, just make sure GH_PRIVATE_KEY_PATH is set correctly).

You can generate both client secret and private key on the GitHub App settings page.

Dependencies

Go will automatically install all dependencies once you execute go run or go build.

DB Setup

You must have sqlite3 installed on your system.

Install goose for migrations:

go install github.com/pressly/goose/v3/cmd/goose@latest

Set GOOSE_* variables in the .env file if you didn't already

GOOSE_DRIVER=sqlite3
GOOSE_DBSTRING=./db/mkblog.db
GOOSE_MIGRATION_DIR=./db/migrations
GOOSE_TABLE=goose_migrations

Run migrations:

goose up

If ~/go/bin is not in your PATH:

~/go/bin/goose up

Run the server:

go run .

Caddy

caddy run --resume

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages