-
-
Save cppforlife/dd186d8993b045f15dffc6b42f4ea3d9 to your computer and use it in GitHub Desktop.
ytt docker-dash configuration templating
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
network: testnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@ load("@ytt:data", "data") | |
#@ load("misc.star", "indexed_item") | |
--- | |
version: '3' | |
services: | |
dashd: | |
#@ img_dashd = indexed_item(data.values.images.dashd, data.values.network) | |
image: #@ img_dashd.image | |
command: /bin/bash -c 'dashd -conf=/dash/dash.conf' | |
restart: always | |
volumes: | |
- dash.conf:/dash/dash.conf | |
- dashd_data:/dash | |
ports: | |
#@ port_dashd = indexed_item(data.values.ports.dashd, data.values.network) | |
- #@ port_dashd.p2p + ":" + port_dashd.p2p | |
sentinel: | |
image: #@ getattr(data.values.images.sentinel, data.values.network).image | |
volumes: | |
dashd_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
#@overlay/match missing_ok=True | |
images: | |
dashd: | |
- network: evonet | |
image: dashpay/dashd:0.14.0.5 | |
- network: testnet | |
image: dashpay/dashd-develop:latest | |
- network: mainnet | |
image: dashpay/dashd:0.14.0.5 | |
sentinel: | |
evonet: | |
image: strophy/sentinel:latest | |
testnet: | |
image: strophy/sentinel:latest | |
mainnet: | |
image: strophy/sentinel:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@ytt:assert", "assert") | |
def indexed_item(list, network): | |
for item in list: | |
if item.network == network: | |
return item | |
end | |
end | |
assert.fail("Expected to find item with network but did not") | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#@data/values | |
--- | |
#@overlay/match missing_ok=True | |
ports: | |
dashd: | |
- network: mainnet | |
p2p: "9999" | |
rpc: "9998" | |
zmq: "9997" | |
- network: testnet | |
p2p: "19999" | |
rpc: "19998" | |
zmq: "19997" | |
- network: evonet | |
p2p: "20001" | |
rpc: "20002" | |
zmq: "20003" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment