-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (64 loc) · 1.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (64 loc) · 1.99 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: website_profiling
POSTGRES_USER: profiling
POSTGRES_PASSWORD: profiling
volumes:
- pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U profiling -d website_profiling"]
interval: 5s
timeout: 3s
retries: 5
web:
build:
context: .
dockerfile: Dockerfile
image: website-profiling:latest
depends_on:
postgres:
condition: service_healthy
ports:
- "3000:3000"
environment:
WEBSITE_PROFILING_ROOT: /app
DATABASE_URL: postgres://profiling:profiling@postgres:5432/website_profiling
DATA_DIR: /data
PYTHON: /opt/venv/bin/python
NODE_ENV: production
CHROME_PATH: /usr/bin/chromium
LIGHTHOUSE_PATH: /usr/local/bin/lighthouse
LIGHTHOUSE_CHROME_FLAGS: --headless --no-sandbox --disable-dev-shm-usage --disable-gpu
volumes:
- profiling-data:/data
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://127.0.0.1:3000/home', (r) => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
# Optional remote MCP (Streamable HTTP). Uncomment and set WP_MCP_TOKEN / WP_MCP_ALLOWED_HOSTS.
# mcp:
# build:
# context: .
# dockerfile: Dockerfile
# image: website-profiling:latest
# depends_on:
# postgres:
# condition: service_healthy
# command: ['python', '-m', 'website_profiling.mcp.http']
# environment:
# WEBSITE_PROFILING_ROOT: /app
# DATABASE_URL: postgres://profiling:profiling@postgres:5432/website_profiling
# WP_MCP_HTTP_HOST: 0.0.0.0
# WP_MCP_HTTP_PORT: 8000
# WP_MCP_TOKEN: ${WP_MCP_TOKEN:-dev-mcp-token}
# WP_MCP_ALLOWED_HOSTS: localhost,127.0.0.1
# WP_MCP_DOMAIN: core
# ports:
# - "8000:8000"
volumes:
pg-data:
profiling-data: