-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
executable file
·131 lines (122 loc) · 4.25 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
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
version: '3.8'
services:
prepare-full-node:
image: busybox
restart: "no"
command: ["sh", "/home/pocket/.poktroll/scripts/init-poktrolld.sh"]
environment:
- NETWORK_NAME=${NETWORK_NAME}
volumes:
- ./poktrolld-data:/home/pocket/.poktroll/
- ./scripts/:/home/pocket/.poktroll/scripts
# Necessary to change ownership of the files, as our production image does not run the process under root.
- ./relayminer:/home/pocket/.poktroll/relayminer
- ./appgate:/home/pocket/.poktroll/appgate
- ./gateway:/home/pocket/.poktroll/gateway
# Full node
full-node:
container_name: full-node
image: ${POKTROLLD_IMAGE_REPO}:${POKTROLLD_IMAGE_TAG_VALIDATOR:-latest}
entrypoint: ["sh", "/home/pocket/start-poktrolld.sh"]
environment:
- NODE_HOSTNAME=${NODE_HOSTNAME}
- POKTROLLD_LOG_LEVEL=${POKTROLLD_LOG_LEVEL}
ports:
- "26657:26657"
- "26656:26656"
- "9090:9090"
restart: unless-stopped
depends_on:
prepare-full-node:
condition: service_completed_successfully
volumes:
- /etc/ssl/:/etc/ssl/
- ./poktrolld-data:/home/pocket/.poktroll/
- ./scripts/start-poktrolld.sh:/home/pocket/start-poktrolld.sh
- ./stake_configs:/poktroll/stake_configs
# Relay Miner
relayminer:
image: ${POKTROLLD_IMAGE_REPO}:${POKTROLLD_IMAGE_TAG_OFF_CHAIN:-latest}
container_name: relayminer
entrypoint: ["sh", "/home/pocket/start-relayminer.sh"]
environment:
- SUPPLIER_MNEMONIC=${SUPPLIER_MNEMONIC}
ports:
- "8545:8545" # 8545 is the port RelayMiner is configured to listen on in `relayminer_config.yaml`.
restart: unless-stopped
depends_on:
- full-node
volumes:
- /etc/ssl/:/etc/ssl/
- ./relayminer:/home/pocket/.poktroll/
- ./scripts/start-relayminer.sh:/home/pocket/start-relayminer.sh
# AppGate Server
appgate:
image: ${POKTROLLD_IMAGE_REPO}:${POKTROLLD_IMAGE_TAG_OFF_CHAIN:-latest}
container_name: appgate
entrypoint: ["sh", "/home/pocket/start-appgate.sh"]
environment:
- APPLICATION_MNEMONIC=${APPLICATION_MNEMONIC}
ports:
- "85:85" # 85 is the port AppGate Server is configured to listen on in `appgate_server_config.yaml`.
restart: unless-stopped
depends_on:
- full-node
volumes:
- /etc/ssl/:/etc/ssl/
- ./appgate:/home/pocket/.poktroll/
- ./scripts/start-appgate.sh:/home/pocket/start-appgate.sh
# Gateway
gateway:
image: ${POKTROLLD_IMAGE_REPO}:${POKTROLLD_IMAGE_TAG_OFF_CHAIN:-latest}
container_name: gateway
entrypoint: ["sh", "/home/pocket/start-gateway.sh"]
environment:
- GATEWAY_MNEMONIC=${GATEWAY_MNEMONIC}
ports:
- "84:84" # 84 is the port appgate is configured to run as a gateway to listen on in `gateway_config.yaml`.
restart: unless-stopped
depends_on:
- full-node
volumes:
- ./gateway:/home/pocket/.poktroll/
- ./scripts/start-gateway.sh:/home/pocket/start-gateway.sh
# Prometheus
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- prometheus_data:/prometheus
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
# Uncomment if you need direct access to prometheus. It is advised to keep it unexposed to the internet.
# ports:
# - "9191:9090"
# Grafana
grafana:
image: grafana/grafana-oss:latest
container_name: grafana
depends_on:
- prometheus
ports:
- "3000:3000"
restart: unless-stopped
volumes:
- grafana_data:/var/lib/grafana
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
debian:
image: debian:latest
container_name: debian-shell
command: "tail -f /dev/null" # Keeps the container running
stdin_open: true # Allows interaction
tty: true # Enables terminal support
# Define named volumes
volumes:
prometheus_data:
grafana_data: