Fix: docker override URL, worktree .env isolation, ruff version, dependency upgrades#501
Open
paribaker wants to merge 9 commits into
Open
Fix: docker override URL, worktree .env isolation, ruff version, dependency upgrades#501paribaker wants to merge 9 commits into
paribaker wants to merge 9 commits into
Conversation
…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>
…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>
…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>
…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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VITE_DEV_BACKEND_URLindocker-compose.override.ymlfromhttp://localhost:8000tohttp://server:8000(container networking).envwhen creating worktrees, isolatingPROJECT,DB_NAME, andPLAYWRIGHT_TEST_BASE_URLto prevent container-name collisions and shared databases>=0.1.9to>=0.9.8in bootstrapper rootpyproject.tomlto match the templateboto3from1.39.17to1.42.63and addpydantic-ai>=1.84.0Closes #495, closes #496, closes #497, closes #499
Test plan
just upworks in non-Traefik mode (client can reach server viahttp://server:8000)just worktree add <branch>copies.envand patchesPROJECT/DB_NAME/PLAYWRIGHT_TEST_BASE_URLuv syncresolves cleanly with updated ruff and dependency versions>=0.9.8passes🤖 Generated with Claude Code