forked from polkadot-js/api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
102 lines (94 loc) · 2.82 KB
/
docker-compose.yml
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Docker compose file to run Polkadot-JS API e2e test files on supported versions of Polkadot and Substrate
#
# Setup:
# Builds 5 containers with different supported versions of Substrate and Polkadot.
# Runs Polkadot-JS API Tests
#
# Before you can run this script, you need to install Docker and 'Docker Compose' on your machine.
# Please follow the steps described here (including the prerequisites): https://docs.docker.com/compose/install/
#
# Usage:
# 1. BUILD: Run `docker-compose pull && docker-compose up -d` to pull the latest docker imaged and run docker-compose in detached mode. This will run the substrate and polkadot containers in the background.
# 2. INFO: Run `docker ps` to get a list of Docker containers running in the background including their mapped ports on localhost
# 3. TEST: Run `docker-compose logs -f js-api-tests` to run the API tests and print the logs
# 4. QUIT: Run `docker-compose down` to stop and remove all running containers.
#
# Provided Endpoints for localhost:
# - Substrate Master: ws:https://127.0.0.1:9945/
# - Substrate 1.0: ws:https://127.0.0.1:9946/
# - Substrate 2.0: ws:https://127.0.0.1:9947/
# - Polkadot Master: ws:https://127.0.0.1:9948/
# - Polkadot Alexander: ws:https://127.0.0.1:9949/
#
# Find more Docker images of Substrate https://hub.docker.com/r/parity/substrate/tags
# Find more Docker images of Polkadot https://hub.docker.com/r/parity/polkadot/tags
version: "3.7"
services:
substrate-master:
image: parity/substrate:latest
ports:
- "9945:9944"
- "9935:9933"
networks:
- internet
command:
- "--dev"
- "--ws-external"
- "--rpc-external"
substrate-1.0:
image: parity/substrate:v1.0.0
ports:
- "9946:9944"
- "9936:9933"
networks:
- internet
command:
- "--dev"
- "--ws-external"
- "--rpc-external"
substrate-2.0:
image: parity/substrate:2.0.0-b65c315a1
ports:
- "9947:9944"
- "9937:9933"
networks:
- internet
command:
- "--dev"
- "--ws-external"
- "--rpc-external"
polkadot-master:
image: parity/polkadot:latest
ports:
- "9948:9944"
- "9938:9933"
networks:
- internet
command:
- "--dev"
- "--ws-external"
- "--rpc-external"
polkadot-alexander:
image: parity/polkadot:v0.4.4
ports:
- "9949:9944"
- "9939:9933"
networks:
- internet
command:
- "--dev"
- "--ws-external"
- "--rpc-external"
# This is the container running the API tests
js-api-tests:
image: node:11
volumes:
- ./:/polkadot-js/api
working_dir: /polkadot-js/api
network_mode: host
tty: true
environment:
- TERM=xterm-256color`
command: bash -c "NODE_ENV=abc /usr/local/bin/yarn && /usr/local/bin/yarn test:all"
networks:
internet: