-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.87 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
services:
postgres:
image: postgres:17
environment:
POSTGRES_DB: http_header_demo
POSTGRES_USER: header_user
POSTGRES_PASSWORD: header_password
volumes:
- postgres_data:/var/lib/postgresql/data
- ./data:/tmp/data
ports:
- "5432:5432"
command: ["postgres", "-c", "max_connections=500", "-c", "shared_buffers=512MB"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U header_user -d http_header_demo"]
interval: 10s
timeout: 10s
retries: 10
header-testing-server:
# This is required for running desktop linux browsers
# It is possible to run on arm Macs, but the performance is not good
# If only the WPT-HeaderTesting backend server is required, comment this line out on other platforms
platform: linux/amd64
shm_size: 2g # Required for running desktop browsers
build: .
depends_on:
postgres:
condition: service_healthy
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: header_user
DB_PASSWORD: header_password
DB_NAME: http_header_demo
ports:
- "80:80" # WPT-HeaderTesting server on HTTP: change port or disable if port is blocked
- "443:443" # WPT-HeaderTesting server on HTTPS: change port or disable if port is blocked
- "8888:8888" # Jupyter Lap for analysis: change port or disable if port is blocked
# - "5900:5900" # VNC viewer, enable to watch headful browsers in the Docker container
volumes:
- .:/app
cap_add:
- NET_BIND_SERVICE
restart: unless-stopped
command: [
"poetry", "run", "-C", "/app/_hp", "python", "/app/wpt", "serve", "--config", "/app/_hp/wpt-config.json"
# Alternative server that restarts the server every 600s (required if server is internet-reachable)
# "poetry", "run", "-C", "/app/_hp", "python", "/app/server.py"
]
volumes:
postgres_data: