-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.base.yml
113 lines (108 loc) · 3.11 KB
/
docker-compose.base.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
# version: "2.4"
x-iroha-base: &service_iroha_tech
image: ${IROHA_IMAGE:-hyperledger/iroha}
# container_name: iroha-base
ports:
- 50051:50051 ## TORII port
#- 10001:10001 ## Internal port
#- 55552:55552 ## Torii TLS port
#- 9090:9090
- 5551:5551 ## Metrics
expose:
- 10001
- 50051
- 55552
- 5551
environment: &iroha_tech_env
KEY: iroha.tech
IROHA_POSTGRES_HOST: irpsql
# IROHA_POSTGRES_DATABASE: iroha_001
# IROHA_CRYPTO_PROVIDERS_0_TYPE: default
# IROHA_VOTE_DELAY: 5000
# IROHA_MAX_PROPOSAL_SIZE: 10000
# IROHA_CRYPTO_PROVIDERS_0_CRYPTO_TYPE: ed25519_sha3_256
# IROHA_CRYPTO_PROVIDERS_0_KEY: p1
# IROHA_MST_EXPIRATION_TIME: 1440
# IROHA_PG_OPT: dbname=iroha_001 host=iroha-postgres port=5432 user=postgres password=postgres
# IROHA_MAX_ROUNDS_DELAY: 10000
# IROHA_BLOCK_STORE_PATH: /tmp/block_store/
# IROHA_MST_ENABLE: true
# IROHA_CRYPTO_PROVIDERS_0_PRIVATE_KEY: cc5013e43918bd0e5c4d800416c88bed77892ff077929162bb03ead40a745e88
# IROHA_TORII_PORT: 50051
# IROHA_INTERNAL_PORT: 10001
# IROHA_PROPOSAL_DELAY: 1
# IROHA_CRYPTO_SIGNER: p1
volumes:
- block_strore_1:/tmp/block_store
- ./genesis-1.block:/opt/iroha_data/genesis.block
- ./iroha-common-config.json:/opt/iroha_data/config.docker
- ./keys/iroha.tech.001.priv:/opt/iroha_data/iroha.tech.priv
- ./keys/iroha.tech.001.pub:/opt/iroha_data/iroha.tech.pub
depends_on:
- irpsql
logging:
driver: "json-file"
options:
max-size: "1000m"
max-file: "5"
# restart: always
command: "${IROHA_COMMAND}" ## Taken from file .env
## debugging
ulimits:
core: -1
cap_add:
- SYS_PTRACE
services:
irpsql:
image: postgres:11.6
container_name: irpsql
healthcheck:
test: pg_isready -U postgres
interval: 30s
timeout: 5s
retries: 3
start_period: 300s
environment:
POSTGRES_PASSWORD: postgres
expose:
- 5432
ports:
- 65432:5432 ## to be able to debug
volumes:
- postgres_data:/var/lib/postgresql/data
# networks:
# - iroha-net
restart: always
command: "postgres -c shared_preload_libraries=pg_stat_statements -c pg_stat_statements.track=all -c max_connections=200"
# ## ToDo collect metrics from Iroha nodes
# metrics:
# image: prometheus
# ports:
# - 8090:8090
# volumes:
# - iroha_prometheus_data:/opt/data
# networks:
# - iroha-net
# restart: always
## To be used as following for analisys and debug
## docker compose run all-volumes ls -l /tmp/block_store_1/
# all-volumes:
# image: ubuntu
# container_name: iroha-volumes
# volumes:
# - postgres_data:/var/lib/postgresql/data
# - block_store_1:/tmp/block_store_1
# - block_store_2:/tmp/block_store_2
# - block_store_3:/tmp/block_store_3
# - block_store_4:/tmp/block_store_4
# stdin_open: true # docker run -i
# tty: true # docker run -t
volumes:
postgres_data:
block_store_1:
block_store_2:
block_store_3:
block_store_4:
#iroha_prometheus_data:
# iroha-dev:
# external: true