-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
165 lines (157 loc) · 4.94 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
version: "3.8"
services:
chainlink:
build:
context: https://github.com/smartcontractkit/chainlink.git
dockerfile: core/chainlink.Dockerfile
# command: node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials
entrypoint: ''
command: /bin/sh -c "chainlink node import /run/secrets/keystore && chainlink node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials"
restart: always
environment:
CHAINLINK_DB_NAME: "node_dev"
CHAINLINK_DEV: "true"
CHAINLINK_PGPASSWORD: "node"
CHAINLINK_TLS_HOST: "localhost"
CHAINLINK_TLS_PORT: 6689
CHAINLINK_URL: "http://localhost:6688"
CLIENT_NODE_URL: "http://localhost:6688"
ETH_CHAIN_ID: 1337
ETH_URL: "ws://ganache:8545"
EXPLORER_URL: "ws://explorer:3001"
EXPLORER_ACCESS_KEY: "u4HULe0pj5xPyuvv"
EXPLORER_SECRET: "YDxkVRTmcliehGZPw7f0L2Td3sz3LqutAQyy7sLCEIP6xcWzbO8zgfBWi4DXC6U6"
LOG_LEVEL: "debug"
MINIMUM_CONTRACT_PAYMENT: 1000000000000
MIN_INCOMING_CONFIRMATIONS: 1
MIN_OUTGOING_CONFIRMATIONS: 1
RUST_BACKTRACE: 1
DEFAULT_HTTP_TIMEOUT: "5s"
ENABLE_EXPERIMENTAL_ADAPTERS: "true"
# ENABLE_BULLETPROOF_TX_MANAGER: "true"
GAS_UPDATER_ENABLED: "true"
DATABASE_URL: "postgresql://postgres:node@db:5432/node_dev?sslmode=disable"
SECURE_COOKIES: "false"
TLS_CERT_PATH: "/root/tls/server.crt"
TLS_KEY_PATH: "/root/tls/server.key"
ALLOW_ORIGINS: "*"
ORACLE_CONTRACT_ADDRESS: "0x8886DB5440147798D27E8AB9c9090140b5cEcA47"
LINK_CONTRACT_ADDRESS: "0xF4d0e956464396cEBC998F60C0AB8720161fa4c2"
volumes:
- ./config/tls:/root/tls
- ./_templates/alarm-job.json:/root/jobs/alarm-job.json
ports:
- "6688:6688"
- "6689:6689"
depends_on:
- db
- ganache
- explorer
secrets:
- keystore
- node_password
- apicredentials
db:
image: postgres
restart: always
environment:
POSTGRES_DB: node_dev
POSTGRES_PASSWORD: node
# Override the data location since `/var/lib/postgresql/data` is a defined
# volume by PostgreSQL
# PGDATA: /data
ports:
- "5432:5432"
volumes:
# Initialize database with a consistent job id
- ./data/db/backup.sql:/docker-entrypoint-initdb.d/init-db.sql
# - db-data:/var/lib/postgresql/data
explorer:
image: chainlink/explorer
build:
context: https://github.com/smartcontractkit/chainlink.git
dockerfile: explorer/Dockerfile
entrypoint: yarn workspace @chainlink/explorer dev:compose
restart: always
ports:
- "8080:3001"
depends_on:
- chainlink-explorer-db
environment:
EXPLORER_COOKIE_SECRET: "YDxkVRTmcliehGZPw7f0L2Td3sz3LqutAQyy7sLCEIP6xcWzbO8zgfBWi4DXC6U6"
EXPLORER_SERVER_PORT: 3001
PGPASSWORD: "explorer"
ingester:
image: chainlink/ingester
build:
context: https://github.com/smartcontractkit/chainlink.git
dockerfile: ingester/ingester.Dockerfile
restart: always
depends_on:
- ganache
- chainlink
- explorer
- chainlink-explorer-db
environment:
ETH_CHAIN_ID: 1337
ETH_URL: "ws://ganache:8545"
DB_HOST: "chainlink-explorer-db"
DB_NAME: "explorer_dev"
DB_PORT: 5432
DB_USERNAME: "postgres"
DB_PASSWORD: "explorer"
chainlink-explorer-db:
image: postgres
container_name: chainlink-explorer-db
# volumes:
# - explorer-db-data:/var/lib/postgresql/data
ports:
- 5433:5432
environment:
POSTGRES_DB: "explorer_dev"
POSTGRES_PASSWORD: "explorer"
# external-adapter:
# container_name: external-adapter
# image: smartcontract/external-adapter
# build:
# context: ../../
# dockerfile: tools/external-adapter/Dockerfile
# ports:
# - '6644:6644'
# environment:
# - EXTERNAL_ADAPTER_PORT=$EXTERNAL_ADAPTER_PORT
ganache:
image: trufflesuite/ganache-cli
command: [
"node", "/app/ganache-core.docker.cli.js",
# For predictability
"--deterministic",
"--mnemonic",
"result soon dose birth swap lonely street staff course snack frog path",
"--networkId", "1337",
# For persistance
"--acctKeys", "/app/data/keys/account-keys.json",
"--db", "/app/data/chain",
# For player testing
"--accounts", "16",
# Ensure node operator address exists
# "--unlock", "0x7BEEA9C52881C83899C087B24d4f50A5aff3C7A0"
]
volumes:
- ./data/ganache/keys:/app/data/keys
# - ./data/ganache/chain:/app/data/chain
ports:
- "8545:8545"
# Volumes currently commented out for faster development when resetting to clean
# slate.
volumes:
db-data:
# explorer-db-data:
secrets:
keystore:
file: config/secrets/0xf4cfd1ab20d02a35dda8cda4fcb092bc3829ae22.json
# Decrypt keystore file
node_password:
file: config/secrets/password
apicredentials:
file: config/secrets/apicredentials