Skip to content

Instantly share code, notes, and snippets.

@strophy
Created January 24, 2020 23:54
Show Gist options
  • Save strophy/deaed03438990795a121cb5524c1ae9c to your computer and use it in GitHub Desktop.
Save strophy/deaed03438990795a121cb5524c1ae9c to your computer and use it in GitHub Desktop.
ytt docker-dash configuration templating
#@data/values
---
network: testnet
#@ load ("@ytt:data", "data")
---
version: '3'
services:
dashd:
#@ for d in data.values.images.dashd:
#@ if/end d.network == data.values.network:
image: #@ d.image
#@ end
command: /bin/bash -c 'dashd -conf=/dash/dash.conf'
restart: always
volumes:
- dash.conf:/dash/dash.conf
- dashd_data:/dash
ports:
#@ for d in data.values.ports.dashd:
#@ if/end d.network == data.values.network:
- #@ d.p2p + ":" + d.p2p
#@ end
sentinel:
#@ for d in data.values.images.sentinel:
#@ if/end d.network == data.values.network:
image: #@ d.image
#@ end
volumes:
dashd_data:
#@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:
- network: evonet
image: strophy/sentinel:latest
- network: testnet
image: strophy/sentinel:latest
- network: mainnet
image: strophy/sentinel:latest
#@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