-
Notifications
You must be signed in to change notification settings - Fork 23
/
docker-compose.yml.template
107 lines (107 loc) · 3.57 KB
/
docker-compose.yml.template
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
version: "3.6"
x-base: &base
user: "${LIKECOIN_UID}:1000"
image: ${LIKECOIN_DOCKER_IMAGE}
x-script-base: &script-base
<<: *base
profiles: ["scripts"]
volumes:
- type: bind
source: ./
target: /host
services:
liked-service-liked:
<<: *base
profiles: ["raw"]
volumes:
- type: bind
source: ./.liked/config
target: /likechain/.liked/config
- type: bind
source: ./.liked/data
target: /likechain/.liked/data
ports:
- 26656:26656
- 127.0.0.1:26657:26657
# - 1317:1317 # for RESTful API
# - 9090:9090 # for gRPC
restart: always
command: [
"liked", "--home", "/likechain/.liked", "start",
"--get-ip",
"--rpc.laddr", "tcp://0.0.0.0:26657",
"--p2p.seeds", "${LIKECOIN_SEED_NODES}",
"--halt-time", "${LIKECOIN_HALT_TIME}",
"--halt-height", "${LIKECOIN_HALT_HEIGHT}",
]
liked-service-cosmovisor:
<<: *base
volumes:
- type: bind
source: ./.liked/config
target: /likechain/.liked/config
- type: bind
source: ./.liked/data
target: /likechain/.liked/data
- type: bind
source: ./.liked/cosmovisor/upgrades
target: /likechain/.liked/cosmovisor/upgrades
ports:
- 26656:26656
- 127.0.0.1:26657:26657
# - 1317:1317 # for RESTful API
# - 9090:9090 # for gRPC
restart: always
command: [
"cosmovisor", "run", "--home", "/likechain/.liked", "start",
"--get-ip",
"--rpc.laddr", "tcp://0.0.0.0:26657",
"--p2p.seeds", "${LIKECOIN_SEED_NODES}",
"--halt-time", "${LIKECOIN_HALT_TIME}",
"--halt-height", "${LIKECOIN_HALT_HEIGHT}",
]
# Below are scripts for `docker-compose run` command, not auto-executing services
liked-command:
<<: *script-base
entrypoint: ["liked", "--home", "/host/.liked"]
init:
<<: *script-base
command: ["bash", "/host/init.sh", "${LIKECOIN_MONIKER}", "${LIKECOIN_GENESIS_URL}", "${LIKECOIN_SEED_NODES}"]
# 1. create directories
# 2. init chain, setup moniker
# 3. copy / download genesis.json
create-validator:
<<: *script-base
entrypoint: [
"liked", "--home", "/host/.liked",
"tx", "staking", "create-validator",
"--chain-id", "${LIKECOIN_CHAIN_ID}",
"--from", "validator",
"--node", "tcp://liked-service:26657",
"--moniker", "${LIKECOIN_MONIKER}",
"--pubkey", "${LIKECOIN_VALIDATOR_PUBKEY}",
"--commission-max-rate", "1.0",
"--commission-max-change-rate", "1.0",
"--min-self-delegation", "1",
# to fill in:
# --amount
# --details
# --commission-rate
# --identity (optional)
# --website (optional)
]
vote:
<<: *script-base
entrypoint: [
"liked", "--home", "/host/.liked",
"tx", "gov", "vote",
"--chain-id", "${LIKECOIN_CHAIN_ID}",
"--from", "validator",
"--node", "tcp://liked-service:26657",
# to fill in:
# 1. proposal ID
# 2. vote option ("yes" / "no" / "veto" / "abstain")
]
networks:
default:
name: likecoin-chain