Add Zcash support (#995)
* add zcash fragment with definition * fix zcash port number * fix zec db data and add zec lightwalletd fullnode opt * fix zec lightwalletd zcash.conf error * remove LWD_URL for main zec fragment * set zcash docker image to latest * revert zcash-walletd to 0.0.2 * move zec lwd_url back to zecrocks * add zcash-fullnode exclusive fragment * add fragment configs support * fix compose generator configs --------- Co-authored-by: macintoshhelper <6757532+macintoshhelper@users.noreply.github.com>
This commit is contained in:
@@ -94,5 +94,13 @@
|
||||
"LNDFragment": null,
|
||||
"EclairFragment": null,
|
||||
"PhoenixdFragment": null
|
||||
},
|
||||
{
|
||||
"Crypto": "zec",
|
||||
"CryptoFragment": "zcash",
|
||||
"CLightningFragment": null,
|
||||
"LNDFragment": null,
|
||||
"EclairFragment": null,
|
||||
"PhoenixdFragment": null
|
||||
}
|
||||
]
|
||||
|
||||
92
docker-compose-generator/docker-fragments/zcash-fullnode.yml
Normal file
92
docker-compose-generator/docker-fragments/zcash-fullnode.yml
Normal file
@@ -0,0 +1,92 @@
|
||||
services:
|
||||
zcash_walletd:
|
||||
restart: unless-stopped
|
||||
image: 1337bytes/zcash-walletd:0.0.2
|
||||
environment:
|
||||
NOTIFY_TX_URL: http://btcpayserver:49392/zcashlikedaemoncallback/tx?cryptoCode=zec&hash=
|
||||
ROCKET_DB_PATH: /data/zec-wallet.db
|
||||
LWD_URL: http://lightwalletd:9067
|
||||
expose:
|
||||
- "8000"
|
||||
volumes:
|
||||
- "zec_wallet:/data"
|
||||
|
||||
btcpayserver:
|
||||
environment:
|
||||
BTCPAY_ZEC_DAEMON_URI: http://zcash_walletd:8000
|
||||
BTCPAY_ZEC_WALLET_DAEMON_URI: http://zcash_walletd:8000
|
||||
BTCPAY_ZEC_WALLET_DAEMON_WALLETDIR: /root/zec_wallet
|
||||
volumes:
|
||||
- "zec_wallet:/root/zec_wallet"
|
||||
|
||||
zebra:
|
||||
container_name: zebra
|
||||
image: zfnd/zebra
|
||||
platform: linux/amd64
|
||||
restart: unless-stopped
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
cpus: "4"
|
||||
memory: 16G
|
||||
volumes:
|
||||
- zebrad-cache:/home/zebra/.cache/zebra
|
||||
tty: true
|
||||
environment:
|
||||
- ZEBRA_RPC_PORT=8232
|
||||
- ENABLE_COOKIE_AUTH=false
|
||||
ports:
|
||||
- "8232:8232"
|
||||
#networks:
|
||||
# - generated_default
|
||||
|
||||
lightwalletd:
|
||||
image: electriccoinco/lightwalletd
|
||||
platform: linux/amd64
|
||||
depends_on:
|
||||
zebra:
|
||||
condition: service_started
|
||||
restart: unless-stopped
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
cpus: "4"
|
||||
memory: 16G
|
||||
environment:
|
||||
- LWD_GRPC_PORT=9067
|
||||
- LWD_HTTP_PORT=9068
|
||||
configs:
|
||||
- source: lwd_config
|
||||
target: /etc/lightwalletd/zcash.conf
|
||||
volumes:
|
||||
- lwd-cache:/var/lib/lightwalletd/db
|
||||
#! This setup with `--no-tls-very-insecure` is only for testing purposes.
|
||||
#! For production environments, follow the guidelines here:
|
||||
#! https://github.com/zcash/lightwalletd#production-usage
|
||||
command: >
|
||||
--no-tls-very-insecure
|
||||
--grpc-bind-addr=0.0.0.0:9067
|
||||
--http-bind-addr=0.0.0.0:9068
|
||||
--zcash-conf-path=/etc/lightwalletd/zcash.conf
|
||||
--data-dir=/var/lib/lightwalletd/db
|
||||
--log-file=/dev/stdout
|
||||
--log-level=7
|
||||
ports:
|
||||
- "127.0.0.1:9067:9067" # gRPC
|
||||
- "127.0.0.1:9068:9068" # HTTP
|
||||
|
||||
configs:
|
||||
lwd_config:
|
||||
file: ./zcash.conf
|
||||
|
||||
volumes:
|
||||
zec_wallet:
|
||||
zec_data:
|
||||
zebrad-cache:
|
||||
driver: local
|
||||
|
||||
lwd-cache:
|
||||
driver: local
|
||||
|
||||
exclusive:
|
||||
- zcash-node
|
||||
27
docker-compose-generator/docker-fragments/zcash.yml
Normal file
27
docker-compose-generator/docker-fragments/zcash.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
zcash_walletd:
|
||||
restart: unless-stopped
|
||||
image: 1337bytes/zcash-walletd:0.0.2
|
||||
environment:
|
||||
NOTIFY_TX_URL: http://btcpayserver:49392/zcashlikedaemoncallback/tx?cryptoCode=zec&hash=
|
||||
ROCKET_DB_PATH: /data/zec-wallet.db
|
||||
LWD_URL: https://zec.rocks:443
|
||||
expose:
|
||||
- "8000"
|
||||
volumes:
|
||||
- "zec_wallet:/data"
|
||||
btcpayserver:
|
||||
environment:
|
||||
BTCPAY_ZEC_DAEMON_URI: http://zcash_walletd:8000
|
||||
BTCPAY_ZEC_WALLET_DAEMON_URI: http://zcash_walletd:8000
|
||||
BTCPAY_ZEC_WALLET_DAEMON_WALLETDIR: /root/zec_wallet
|
||||
volumes:
|
||||
- "zec_wallet:/root/zec_wallet"
|
||||
volumes:
|
||||
zec_wallet:
|
||||
zec_data:
|
||||
|
||||
exclusive:
|
||||
- zcash-node
|
||||
@@ -142,6 +142,7 @@ namespace DockerGenerator
|
||||
|
||||
var services = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
var volumes = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
var configs = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
var networks = new List<KeyValuePair<YamlNode, YamlNode>>();
|
||||
foreach (var o in processedFragments.Select(f => (f, ParseDocument(f))).ToList())
|
||||
{
|
||||
@@ -155,6 +156,10 @@ namespace DockerGenerator
|
||||
{
|
||||
volumes.AddRange(fragmentVolumesRoot.Children);
|
||||
}
|
||||
if (doc.Children.ContainsKey("configs") && doc.Children["configs"] is YamlMappingNode fragmentConfigsRoot)
|
||||
{
|
||||
configs.AddRange(fragmentConfigsRoot.Children);
|
||||
}
|
||||
if (doc.Children.ContainsKey("networks") && doc.Children["networks"] is YamlMappingNode fragmentNetworksRoot)
|
||||
{
|
||||
networks.AddRange(fragmentNetworksRoot.Children);
|
||||
@@ -165,6 +170,7 @@ namespace DockerGenerator
|
||||
output.Add("version", new YamlScalarNode("3") { Style = YamlDotNet.Core.ScalarStyle.DoubleQuoted });
|
||||
output.Add("services", new YamlMappingNode(Merge(services)));
|
||||
output.Add("volumes", new YamlMappingNode(volumes));
|
||||
output.Add("configs", new YamlMappingNode(configs));
|
||||
output.Add("networks", new YamlMappingNode(networks));
|
||||
PostProcess(output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user