Building and Deploying Locally

The canonical redeploy cycle. CLAUDE.md has the longer first-time setup

flow; this page is the routine version that lives in muscle memory.

When to use this runbook

Every time you want to see your local code change running. Every time.

Context

Tomcat's webapps directory is at `tomcat/tomcat-11/webapps/`. Tomcat

auto-deploys WARs dropped into that directory, but it doesn't always

pick up wiring changes from a hot reload (filter chains, listener

order). The shutdown-wipe-copy-startup cycle is the safe baseline.

`bin/deploy-local.sh` is the heavier alternative — it also re-applies

config templates and runs DB migrations. Use it after pulling a branch

that changed config templates or schema; otherwise the routine cycle

above is faster.

Walkthrough

The frontmatter `steps` are the canonical sequence. The readiness

check at the end (step 6) is the difference between "Tomcat is up"

and "the structural index has finished bootstrap" — both matter for

agent-grade endpoints.

Pitfalls

The frontmatter `pitfalls` capture the recurring traps. The

"editing wikantik-custom.properties in the gitignored tomcat dir"

mistake is especially expensive because the loss is silent — the next

deploy reverts the change without warning.