From 56e53478ea00c7af7dca20dac2f4966fe3d4c9c7 Mon Sep 17 00:00:00 2001 From: codex_a Date: Sat, 28 Feb 2026 20:30:22 +0000 Subject: [PATCH 1/2] fix: update existing default site in seed command instead of hardcoding 127.0.0.1 Wagtail initialises the default site with hostname 'localhost'. The previous get_or_create on '127.0.0.1' left the localhost site intact (still pointing to the Welcome page), so browsers got the wrong root page. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- apps/core/management/commands/seed_e2e_content.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/apps/core/management/commands/seed_e2e_content.py b/apps/core/management/commands/seed_e2e_content.py index 37112b6..06e555f 100644 --- a/apps/core/management/commands/seed_e2e_content.py +++ b/apps/core/management/commands/seed_e2e_content.py @@ -116,15 +116,12 @@ class Command(BaseCommand): legal_index.add_child(instance=privacy) privacy.save_revision().publish() - site, _ = Site.objects.get_or_create( - hostname="127.0.0.1", - port=8000, - defaults={ - "root_page": home, - "is_default_site": True, - "site_name": "No Hype AI", - }, - ) + # Update the existing default site (whatever hostname Wagtail created it with) + # rather than creating a new 127.0.0.1 entry that leaves localhost pointing + # to the Welcome page. + site = Site.objects.filter(is_default_site=True).first() + if site is None: + site = Site(hostname="localhost", port=80) site.root_page = home site.is_default_site = True site.site_name = "No Hype AI" From 7b2ad4cfe59a422bc0e507367df6eba8c764ee42 Mon Sep 17 00:00:00 2001 From: codex_a Date: Sat, 28 Feb 2026 20:33:40 +0000 Subject: [PATCH 2/2] fix: remove server-specific playwright volume from dev compose, auto-seed on startup - /opt/playwright-tools/browsers only exists on agent-workspace; mounting it in docker-compose.yml breaks local dev for everyone else - seed_e2e_content is idempotent so safe to run on every startup; removes the manual step that nobody knew about Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docker-compose.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6a2ef70..b73c903 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,10 +4,10 @@ services: working_dir: /app command: > sh -c "python manage.py migrate --noinput && + python manage.py seed_e2e_content && python manage.py runserver 0.0.0.0:8000" volumes: - .:/app - - /opt/playwright-tools/browsers:/opt/playwright-tools/browsers:ro ports: - "8035:8000" environment: @@ -22,7 +22,6 @@ services: EMAIL_BACKEND: django.core.mail.backends.console.EmailBackend DEFAULT_FROM_EMAIL: hello@nohypeai.com NEWSLETTER_PROVIDER: buttondown - PLAYWRIGHT_BROWSERS_PATH: /opt/playwright-tools/browsers depends_on: db: condition: service_healthy