23 lines
763 B
Makefile
23 lines
763 B
Makefile
DATABASE_URL ?= postgres://wherewoof:ww_dev_2026@192.168.20.13:5434/wherewoof
|
|
export DATABASE_URL
|
|
|
|
.PHONY: db-up seed run build generate psql
|
|
|
|
db-up: ## apply db/schema.sql (embedded migrator, no psql needed)
|
|
cd frontend && go run ./cmd/migrate -schema ../db/schema.sql
|
|
|
|
seed: ## insert test tag codes TEST000001..TEST000010
|
|
cd frontend && go run ./cmd/seed
|
|
|
|
run: ## run the web server (port 3020)
|
|
cd frontend && go run .
|
|
|
|
build: ## build linux amd64 binary for .13
|
|
cd frontend && GOOS=linux GOARCH=amd64 go build -o where-woof .
|
|
|
|
generate: ## regenerate sqlc query code
|
|
cd frontend && sqlc generate
|
|
|
|
psql: ## ad-hoc SQL shell into wherewoof-db on .13 (no local psql install)
|
|
ssh sam@192.168.20.13 docker exec -i wherewoof-db psql -U wherewoof -d wherewoof
|