-
Notifications
You must be signed in to change notification settings - Fork 169
/
docker-compose.yaml
102 lines (96 loc) · 3.61 KB
/
docker-compose.yaml
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 for running E2E tests
#
# .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-. .-.-
# / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \ \ / / \
# `-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-' `-`-'
services:
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
#
# The Aptos local node
#
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
# TODO This node is not yet made a dependency of the tests container
# since we don't have any tests running against Aptos
network-aptos:
extends:
file: docker-compose.templates.yaml
service: aptos-node
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
#
# EVM Network nodes, one for every hardhat network
#
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
network-vengaboys:
extends:
file: docker-compose.templates.yaml
service: evm-node
network-britney:
extends:
file: docker-compose.templates.yaml
service: evm-node
network-tango:
extends:
file: docker-compose.templates.yaml
service: evm-node
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
#
# The TON local node
#
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
network-ton:
extends:
file: docker-compose.templates.yaml
service: ton-node
# ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~
#
# The actual tests
#
# .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
tests:
extends:
file: docker-compose.templates.yaml
service: project
depends_on:
network-vengaboys:
condition: service_healthy
network-britney:
condition: service_healthy
network-tango:
condition: service_healthy
network-ton:
condition: service_healthy
logging:
driver: none
# The default containerized setup will specify the network URLs
# for the internal networks
#
# This works in conjunction with hardhat configs in the test projects.
#
# If these environment variables are not specified, the exposed networks are used
# that need to be started using docker compose up:
#
# docker compose -f docker-compose.yaml -f docker-compose.local.yaml up network-britney network-vengaboys
environment:
- NETWORK_URL_BRITNEY=http://network-britney:8545
- NETWORK_URL_VENGABOYS=http://network-vengaboys:8545
- NETWORK_URL_TANGO=http://network-tango:8545
- NETWORK_URL_TON=http://network-ton:8081/jsonRPC
- DOCKER_COMPOSE_RUN_TESTS_TURBO_ARGS=$DOCKER_COMPOSE_RUN_TESTS_TURBO_ARGS
# Passing environment variables that control the solana tests
- RPC_URL_SOLANA_MAINNET=${RPC_URL_SOLANA_MAINNET}
- RPC_URL_SOLANA_TESTNET=${RPC_URL_SOLANA_TESTNET}
- LZ_DEVTOOLS_ENABLE_SOLANA_TESTS=${LZ_DEVTOOLS_ENABLE_SOLANA_TESTS}
volumes:
- ./node_modules/.cache/turbo:/app/node_modules/.cache/turbo
# Hardhat has an issue with caching compilers inside a docker container,
# failing with EACCES -13 error, pointing to a permissions issue with the cache folder.
#
# The workaround is to provide an outside volume to work
# as a cache directory for hardhat so that the permissions
# don't clash
- ./.cache/hardhat:/root/.cache/hardhat-nodejs
command: "pnpm test"