-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.testing.yml
140 lines (133 loc) · 3.22 KB
/
docker-compose.testing.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# this should be layered on top of docker-compose.yml
services:
entry_node:
container_name: test_entry_node
build:
context: .
dockerfile: dockerfiles/entry_node.dockerfile
depends_on:
- redis
- test_db
volumes:
- .:/app
entrypoint: ["python", "-u", "/app/validator/entry_node/src/main.py"]
ports:
- "8000:8000"
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
POSTGRES_PORT: 5432
POSTGRES_HOST: test_db
ENV: test
query_node:
container_name: test_query_node
build:
context: .
dockerfile: dockerfiles/query_node.dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
restart_policy:
condition: on-failure
update_config:
parallelism: 1
delay: 10s
rollback_config:
parallelism: 1
delay: 10s
depends_on:
- redis
- test_db
volumes:
- .:/app
entrypoint: ["python", "-u", "/app/validator/query_node/src/main.py"]
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
POSTGRES_PORT: 5432
POSTGRES_HOST: test_db
ENV: test
NETUID: 19
chain_node:
container_name: test_chain_node
build:
context: .
dockerfile: dockerfiles/chain_node.dockerfile
depends_on:
- test_db
- redis
volumes:
- .:/app
entrypoint: ["python", "-u", "/app/validator/chain_node/src/main.py"]
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
POSTGRES_PORT: 5432
POSTGRES_HOST: test_db
RUN_ONCE: "true"
DUMMY: "true"
NETUID: 19
ENV: test
NETWORK: test
SECONDS_BETWEEN_SYNC: 60
control_node:
container_name: test_control_node
build:
context: .
dockerfile: dockerfiles/control_node.dockerfile
depends_on:
- redis
- test_db
volumes:
- .:/app
entrypoint: ["python", "-u", "/app/validator/control_node/src/main.py"]
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
POSTGRES_PORT: 5432
POSTGRES_HOST: test_db
ENV: test
test_db:
container_name: test_db
image: postgres:latest
environment:
POSTGRES_DB: test_db
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_HOST: test_db
ports:
- "5433:5432"
dbmate:
image: amacneil/dbmate
volumes:
- ./validator/db:/db
command: up
depends_on:
test_db:
condition: service_started
environment:
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_password
POSTGRES_DB: test_db
POSTGRES_PORT: 5432
POSTGRES_HOST: test_db
DATABASE_URL: "postgres://test_user:test_password@test_db:5432/test_db?sslmode=disable"
test_adminer:
image: adminer
restart: always
ports:
- 5052:8080
environment:
ADMINER_DEFAULT_SERVER: postgresql
ADMINER_DESIGN: nette
ADMINER_PLUGINS: tables-filter tinymce
depends_on:
- test_db
volumes:
postgres_data: