-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
88 lines (85 loc) · 3.74 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
88 lines (85 loc) · 3.74 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Integration test environment.
# Used by scripts/test-docker.sh — do not start manually.
#
# Model: quicksilvervtt-lite runs the Foundry SERVER (with the REST API module
# installed + enabled). The relay launches a headless browser against it via its
# /start-session flow; the module (in that browser) connects back to the relay.
#
# Required env vars (set by test-docker.sh):
# FOUNDRY_MAJOR — Foundry major version, selects the qsl-lite image (e.g. 13)
# FOUNDRY_USERNAME — foundryvtt.com account email (for Foundry download)
# FOUNDRY_PASSWORD — foundryvtt.com account password
# FOUNDRY_TEST_CONFIG_FILE — host path to the per-version quicksilvervtt-lite config
# MODULE_SOURCE_PATH — host path to the built REST API module (dist/)
# CREDENTIALS_ENCRYPTION_KEY — AES-256 key for relay SQLite store
# ADMIN_JWT_SECRET — JWT signing secret for relay admin
services:
foundry:
# Major tag tracks that Foundry major's latest build (with matching Node).
# FOUNDRY_VERSION is intentionally NOT set here — the image's baked version
# drives the download, so there is no version-mismatch warning.
image: threehats/quicksilvervtt-lite:${FOUNDRY_MAJOR:-13}
environment:
# foundryvtt.com account (for Foundry download) — NOT the world GM login.
# The world GM login is "Gamemaster" (passwordless by default), used only by
# the test process, so there is no collision with these download credentials.
- FOUNDRY_USERNAME=${FOUNDRY_USERNAME}
- FOUNDRY_PASSWORD=${FOUNDRY_PASSWORD}
- FOUNDRY_ADMIN_KEY=testpassword
- FOUNDRY_WORLD=test-world
volumes:
- foundry-data:/data
- ${FOUNDRY_TEST_CONFIG_FILE}:/foundry-config.json:ro
- ${MODULE_SOURCE_PATH}:/dev-modules/foundry-rest-api:ro
# No host port published — the relay reaches Foundry over the Docker network
# (foundry:30000), so the test doesn't collide with native Foundry servers on
# the host. To access the UI while debugging, publish a port here or `exec` in.
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:30000/api/status"]
interval: 10s
timeout: 5s
retries: 24
start_period: 180s
relay:
build:
context: .
dockerfile: go-relay/Dockerfile
environment:
- DB_TYPE=sqlite
- APP_ENV=development
- CREDENTIALS_ENCRYPTION_KEY
- ADMIN_JWT_SECRET
# Seed an admin user at startup so the admin-dashboard test suite can log in.
- ADMIN_EMAIL
- ADMIN_PASSWORD
# Disable all rate limits — the suite fires far faster than real usage and
# would otherwise hit 429s (tests expect the real 4xx, not rate-limit errors).
- MONTHLY_REQUEST_LIMIT=0
- PER_MINUTE_REQUEST_LIMIT=0
- AUTH_RATE_LIMIT=0
- ACCOUNT_MGMT_RATE_LIMIT=0
- PASSWORD_RESET_RATE_LIMIT=0
- PAIRING_RATE_LIMIT=0
- KEY_REQUEST_RATE_LIMIT=0
- PROBE_RATE_LIMIT=0
- ADMIN_LOGIN_RATE_LIMIT=0
volumes:
- relay-data:/app/data
ports:
# Host port is configurable so the test stack can run alongside a local
# dev server (e.g. `air`) that already holds 3010. Container port is 3010.
- "${RELAY_HOST_PORT:-3010}:3010"
# GPU acceleration for headless Chrome. The relay image sets NVIDIA_VISIBLE_DEVICES
# and NVIDIA_DRIVER_CAPABILITIES, so this activates automatically when the NVIDIA
# container runtime is the Docker default. For Intel/AMD, expose /dev/dri instead:
# devices:
# - /dev/dri:/dev/dri
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:3010/api/health"]
interval: 5s
timeout: 3s
retries: 12
start_period: 30s
volumes:
foundry-data:
relay-data: