Skip to content

Commit b36154c

Browse files
committed
Add documentation for playwright exports
1 parent a4dbbca commit b36154c

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,3 +293,7 @@ To import GEC codes along with country ids, run `python manage.py import-gec-cod
293293
## SSO setup
294294

295295
For more info checkout [GO-SSO](./docs/go-sso.md)
296+
297+
## Playwright exports
298+
299+
For more info checkout [Playwright exports](./docs/playwright-exports.md)

docs/playwright-exports.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Backend
2+
3+
Update `.env` with the following:
4+
```bash
5+
GO_WEB_INTERNAL_URL=http://host.docker.internal:3001
6+
# To enable playwright console/network logs
7+
DEBUG_PLAYWRIGHT=True
8+
```
9+
> [!IMPORTANT]
10+
> A second instance of the go-web-app will run at **port 3001** for Playwright.
11+
12+
Start or update containers with:
13+
```bash
14+
# In the background
15+
docker compose up -d serve celery
16+
17+
# In the foreground - Use this to view Playwright logs
18+
docker compose up serve celery
19+
```
20+
21+
## Frontend
22+
23+
For setup instructions, refer to: https://github.com/IFRCGo/go-web-app/?tab=readme-ov-file#local-development
24+
25+
**We need two instances of the go-web-app:**
26+
1. For the host system (browser) on port 3000.
27+
2. For Celery workers (Playwright browser) on port 3001.
28+
29+
To start the regular go-web-app:
30+
```bash
31+
pnpm start:app
32+
```
33+
34+
For the additional go-web-app instance for Playwright:
35+
```bash
36+
APP_API_ENDPOINT=http://host.docker.internal:8000/ pnpm start:app --host --port 3001
37+
```
38+
> [!IMPORTANT]
39+
> The backend will be available at `host.docker.internal:8000` inside the Playwright container running within Celery.

0 commit comments

Comments
 (0)