|
1 | 1 | COMPOSE_DEV := dev/docker/docker-compose.yml |
2 | 2 | COMPOSE_DEBUG_SCRAPER := dev/docker/docker-compose.debug-scraper.yml |
3 | 3 | COMPOSE_E2E := dev/docker/docker-compose.e2e.yml |
| 4 | +COMPOSE_EXTERNAL_NET := dev/docker/docker-compose.external-network.yml |
4 | 5 | ENV_FILE := .env |
5 | 6 | CHROME_PATH ?= /Applications/Google Chrome.app/Contents/MacOS/Google Chrome |
6 | 7 | RUNS ?= 10 |
@@ -59,11 +60,16 @@ scraper: ## Run web scraper on host (headed browser). |
59 | 60 |
|
60 | 61 | ## ---------- End-to-End Testing ---------- |
61 | 62 |
|
62 | | -e2e-up: ## Start the full e2e stack (all services in Docker). Use BUILD=1 to rebuild images. |
63 | | - docker compose -f $(COMPOSE_DEV) -f $(COMPOSE_E2E) --env-file $(ENV_FILE) up $(if $(BUILD),--build) -d |
| 63 | +COMPOSE_E2E_FILES := -f $(COMPOSE_DEV) -f $(COMPOSE_E2E) |
| 64 | +ifdef EXTERNAL_NETWORK |
| 65 | + COMPOSE_E2E_FILES += -f $(COMPOSE_EXTERNAL_NET) |
| 66 | +endif |
| 67 | + |
| 68 | +e2e-up: ## Start the full e2e stack (all services in Docker). Use BUILD=1 to rebuild images. Use EXTERNAL_NETWORK=<name> to join an external Docker network. |
| 69 | + docker compose $(COMPOSE_E2E_FILES) --env-file $(ENV_FILE) up $(if $(BUILD),--build) -d |
64 | 70 |
|
65 | 71 | e2e-down: ## Stop the e2e stack and remove volumes. |
66 | | - docker compose -f $(COMPOSE_DEV) -f $(COMPOSE_E2E) --env-file $(ENV_FILE) down --volumes --remove-orphans |
| 72 | + docker compose $(COMPOSE_E2E_FILES) --env-file $(ENV_FILE) down --volumes --remove-orphans |
67 | 73 |
|
68 | 74 | e2e-test: ## Run Playwright e2e tests (use ARGS for extra flags, e.g. make e2e-test ARGS="--ui"). |
69 | 75 | cd e2e && npx playwright test $(ARGS) |
@@ -91,7 +97,7 @@ e2e-report: ## Open the Playwright HTML report. |
91 | 97 | cd e2e && npx playwright show-report |
92 | 98 |
|
93 | 99 | e2e-logs: ## Tail logs from e2e stack. |
94 | | - docker compose -f $(COMPOSE_DEV) -f $(COMPOSE_E2E) logs -f |
| 100 | + docker compose $(COMPOSE_E2E_FILES) logs -f |
95 | 101 |
|
96 | 102 | ## ---------- Documentation ---------- |
97 | 103 |
|
|
0 commit comments