chore(makefile): add worktree-new/worktree-rm targets for isolated dev servers

Encode the dual-repo worktree SOP as make targets so no step is skipped:
worktree-new creates the outer worktree off main, inits its own user/
submodule, branches both repos, and starts an isolated Grav dev server on an
auto-picked free port (8090+) whose identity is persisted in a git-ignored
.worktree-env; worktree-rm tears it all down including the submodule deinit
that, when skipped by hand, leaves orphaned .worktrees/ dirs.

docker-compose.yml container_name + ports are parametrized as ${VAR:-default}
so the main checkout is byte-identical, and the 11 hardcoded intotheeast_grav
refs in local targets now use $(GRAV_CONTAINER). CLAUDE.md points at the
commands instead of the manual steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RDS6t8wcpbwKvvrxykVQ5K
This commit is contained in:
2026-07-08 10:56:07 +02:00
co-authored by Claude Opus 4.8
parent 793ca10d4d
commit c4891d8f60
4 changed files with 78 additions and 15 deletions
+5 -3
View File
@@ -1,13 +1,15 @@
services:
grav:
build: .
container_name: intotheeast_grav
# Overridable so a git worktree can run its own isolated dev server (see
# `make worktree-new`); unset → the canonical main-checkout values below.
container_name: ${GRAV_CONTAINER:-intotheeast_grav}
environment:
- GRAV_CHANNEL=production
- APACHE_RUN_USER=#1000
- APACHE_RUN_GROUP=#1000
ports:
- "8081:80"
- "${GRAV_PORT:-8081}:80"
volumes:
- ./user:/var/www/html/user
- ./php/php-local.ini:/usr/local/etc/php/conf.d/php-local.ini
@@ -16,7 +18,7 @@ services:
travel-memories:
build: ./services/travel-memories
ports:
- "8082:8082"
- "${TM_PORT:-8082}:8082"
volumes:
- ./docs/immich-workflow:/app/state
- ./user/pages:/app/pages