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>
This commit is contained in:
36
Makefile
Normal file
36
Makefile
Normal file
@@ -0,0 +1,36 @@
|
||||
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
|
||||
Reference in New Issue
Block a user