Skip to content

Fix: docker override URL, worktree .env isolation, ruff version, dependency upgrades#501

Open
paribaker wants to merge 9 commits into
mainfrom
fix/issues-495-496-497-499
Open

Fix: docker override URL, worktree .env isolation, ruff version, dependency upgrades#501
paribaker wants to merge 9 commits into
mainfrom
fix/issues-495-496-497-499

Conversation

@paribaker

Copy link
Copy Markdown
Contributor

Summary

Closes #495, closes #496, closes #497, closes #499

Test plan

  • Verify just up works in non-Traefik mode (client can reach server via http://server:8000)
  • Verify just worktree add <branch> copies .env and patches PROJECT/DB_NAME/PLAYWRIGHT_TEST_BASE_URL
  • Verify two worktrees can run simultaneously without container-name or DB collisions
  • Verify uv sync resolves cleanly with updated ruff and dependency versions
  • Run linting CI to confirm ruff >=0.9.8 passes

🤖 Generated with Claude Code

…on, and dependency upgrades

- Fix VITE_DEV_BACKEND_URL in docker-compose.override.yml to use container
  hostname (server:8000) instead of localhost:8000 (#495)
- Copy and patch .env when creating worktrees to isolate PROJECT, DB_NAME,
  and PLAYWRIGHT_TEST_BASE_URL per worktree (#496)
- Upgrade ruff minimum from >=0.1.9 to >=0.9.8 in bootstrapper root
  pyproject.toml to match the template (#497)
- Upgrade boto3 to 1.42.63 and add pydantic-ai>=1.84.0 (#499)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@whusterj whusterj temporarily deployed to tn-spa-bootstrapper-pr-501 May 10, 2026 17:51 Inactive
@whusterj whusterj temporarily deployed to tn-spa-bootstrapper-pr-501 May 10, 2026 21:30 Inactive
Pari Work Temp and others added 2 commits May 18, 2026 11:27
…e generated my_project

- Ruff: pre-commit rev v0.8.6 → v0.9.8, pin ruff==0.9.8 in linting.yml
- Pydantic-AI: minimum already at >=1.84.0, boto3 pinned to 1.42.63
- Vite 8 migration: vite ^8.0.16, vitest ^4.1.8, plugin-react-swc ^4.3.1
- Add @vitest/coverage-v8, bump qs to ^6.15.2
- Update vitest reference type in vite.config.ts for Vite 8
- Templatize uv.lock project name with cookiecutter syntax
- Remove generated my_project/ test artifact

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@paribaker paribaker temporarily deployed to tn-spa-bootstrapper-pr-501 June 2, 2026 12:09 Inactive
…vars

just's dotenv-load does not override env vars already set in the shell.
When switching between worktrees, stale values cause docker compose to
interpolate wrong DB_NAME/DB_USER/DB_PASS in the YAML.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@whusterj whusterj temporarily deployed to tn-spa-bootstrapper-pr-501 June 2, 2026 14:26 Inactive
…t env

The worktree recipe runs in the main project's context, so just's
dotenv-load has already loaded the main project's .env vars. When it
calls just setup-dev in the worktree, the child just process inherits
those vars and dotenv-load won't override them. This causes django-migrate
and create-test-data to use wrong DB credentials (from the parent project).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@whusterj whusterj temporarily deployed to tn-spa-bootstrapper-pr-501 June 2, 2026 15:28 Inactive
@whusterj whusterj temporarily deployed to tn-spa-bootstrapper-pr-501 June 4, 2026 12:33 Inactive
Pari Work Temp and others added 2 commits June 30, 2026 12:18
The worktree setup was running django-migrate and create-test-data on the
host (cd server && python manage.py migrate), which connects to 127.0.0.1:5432.
This fails when another postgres already occupies that port, or when env vars
leak from the parent project's shell.

Now uses docker compose run --rm server, which:
- connects via DB_HOST=postgres (container networking, no port conflicts)
- respects depends_on health checks (waits for postgres to be ready)
- reads env vars from the container's env_file, not the host shell

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…pace, and duplicate migrate

- Use `,` as sed delimiter when stripping branch prefixes to avoid
  conflict with `|` alternation inside the regex group
- Ensure Traefik is set up before `just up` so concurrent worktrees
  don't fight over hardcoded host port bindings
- Remove redundant migrate call — the server container's /start
  entrypoint already runs it, preventing DuplicateTable errors
- Wait for runserver to be listening on port 8000 (not just container
  health) before seeding test data
- Use `docker exec -w /tmp` for readiness checks and
  `docker compose run --rm -T` for management commands to avoid
  Docker Desktop 29.x mount namespace breakout false positives

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants