-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.docs-snapshots.yml
More file actions
63 lines (59 loc) · 2.68 KB
/
docker-compose.docs-snapshots.yml
File metadata and controls
63 lines (59 loc) · 2.68 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
services:
# Extract the code blocks from the docs in the plugins directories and output them ssto a results directory.
deephaven-plugins-docs-extractor:
image: ghcr.io/deephaven/salmon-extractor:1
pull_policy: always
container_name: deephaven-plugins-docs-extractor
command:
[
'sh',
'-c',
'node extract.cjs --directory /extract/plotly-express --output /results/plotly-express; node extract.cjs --directory /extract/ui --output /results/ui',
]
volumes:
- ./plugins/ui/docs:/extract/ui
- ./plugins/plotly-express/docs:/extract/plotly-express
# exclude doc build directories by overriding with empty volumes
# We could extract from the build directories, but we need to output the snapshots to the build directory itself for Salmon to pick up...
- /extract/plotly-express/build/
- /extract/ui/build/
- test-sets:/results
# Read the test sets from the results directory and run them against the test server, taking a snapshot of the results.
deephaven-plugins-docs-snapshotter:
image: ghcr.io/deephaven/salmon-snapshotter:1
pull_policy: always
depends_on:
deephaven-plugins-docs-extractor:
condition: service_completed_successfully
environment:
HOST_URL: 'http://server:10000'
DOCKER_CONFIG_DIR: ${PWD}/docker
command:
[
'sh',
'-c',
'node snapshot.cjs --directory /test-sets/plotly-express --output /results/plotly-express --errors /errors/plotly-express; node snapshot.cjs --directory /test-sets/ui --output /results/ui --errors /errors/ui',
]
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Allows the snapshotter to start its own docker containers for the test server
- ${PWD}:${PWD} # Needed so docker/python/docker-compose.yml resolves the correct paths on the host
- test-sets:/test-sets
# Map all the results back to the snapshots directory for those docs
- ./plugins/ui/docs/snapshots:/results/ui
- ./plugins/plotly-express/docs/snapshots:/results/plotly-express
- ./snapshot-results/errors:/errors
# Validate MDX and the snapshots that were written are valid
deephaven-plugins-docs-validator:
image: ghcr.io/deephaven/salmon-validator
pull_policy: always
volumes:
- ./plugins/ui/docs/build/markdown:/validate/ui
- ./plugins/plotly-express/docs/build/markdown:/validate/plotly-express
- ./docker/build/validator-results:/results
volumes:
test-sets:
# This network is set as external in the other compose files so the snapshotter and servers are run on the same network.
networks:
default:
name: deephaven-plugins-docs-snapshot-network
driver: bridge