Files
website/Makefile
jimmy 509e7ccb43 Add Technical Kiwi website with Go, templ, and HTMX.
Single-page site with gallery by album and event, contact form over SMTP,
Docker dev/prod setup, and on-server image derivatives. Gallery photos stay
local (app/images/ is gitignored).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 23:57:59 +12:00

37 lines
729 B
Makefile

COMPOSE ?= docker compose
# Compose does not support nested ${VAR:-${HOME}/...}; set defaults here (override in .env).
-include .env
export GOMODCACHE ?= $(HOME)/go/pkg/mod
export GOCACHE ?= $(HOME)/.cache/go-build
# One-off commands in the dev image (same caches and ./app mount as `make dev`)
DEV_RUN := $(COMPOSE) run --rm --no-deps dev
.PHONY: dev build up down generate tidy logs
.DEFAULT_GOAL := dev
dev:
@test -f .env || cp -n .env.example .env
$(COMPOSE) up --build dev
build:
$(COMPOSE) build website
up:
@test -f .env || cp -n .env.example .env
$(COMPOSE) up --build website
down:
$(COMPOSE) down
generate:
$(DEV_RUN) sh -c "templ generate"
tidy:
$(DEV_RUN) go mod tidy
logs:
$(COMPOSE) logs -f dev