Files
main-site/docker-compose.yml
codex_a f6edcadd46
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m33s
CI / ci (pull_request) Successful in 2m18s
fix: run E2E tests properly with mounted browsers and real postgres
- Mount /opt/playwright-tools/browsers into web container (docker-compose.yml
  and CI docker run) — never download browsers, use the ones on this host
- Set PLAYWRIGHT_BROWSERS_PATH in all container envs (compose + CI)
- Drop 'playwright install chromium' steps from pr-e2e and nightly-e2e jobs
- Bump playwright requirement to ~1.57.0 to match the installed browser builds
- Fix seed_e2e_content: de-duplicate default Site entries left by unit test
  fixtures so Wagtail always routes to the seeded home page
- Fix test_comments_section_absent_when_disabled: use exact=True on heading
  locator to avoid matching 'No Comments Article' h1 as 'Comments' heading
- Fix test_copy_link_button_updates_text: use [data-copy-link] data-attr
  locator (stable across text change) and force-override clipboard.writeText
  via page.evaluate() rather than relying on init_script polyfill

E2E suite verified locally: 34 passed via docker compose exec

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-28 20:20:18 +00:00

47 lines
1.3 KiB
YAML

services:
web:
build: .
working_dir: /app
command: >
sh -c "python manage.py migrate --noinput &&
python manage.py runserver 0.0.0.0:8000"
volumes:
- .:/app
- /opt/playwright-tools/browsers:/opt/playwright-tools/browsers:ro
ports:
- "8035:8000"
environment:
SECRET_KEY: dev-secret-key
DEBUG: "1"
ALLOWED_HOSTS: localhost,127.0.0.1,web
WAGTAIL_SITE_NAME: No Hype AI
DATABASE_URL: postgres://nohype:nohype@db:5432/nohype
DJANGO_SETTINGS_MODULE: config.settings.development
WAGTAILADMIN_BASE_URL: http://localhost:8035
CONSENT_POLICY_VERSION: "1"
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
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: nohype
POSTGRES_USER: nohype
POSTGRES_PASSWORD: nohype
volumes:
- nohype_pg:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nohype -d nohype"]
interval: 5s
timeout: 5s
retries: 10
start_period: 5s
volumes:
nohype_pg: