Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add seednode environment variables for BSQ explorer usage #3856

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions seednode/bisq-seednode.env
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ BITCOIN_RPC_PASSWORD=__BITCOIN_RPC_USER__
BITCOIN_RPC_PORT=8332
BITCOIN_RPC_BLOCKNOTIFY_PORT=5120

# bisq seednode settings
# bisq seednode pathnames
BISQ_HOME=__BISQ_HOME__
BISQ_APP_NAME=bisq-seednode
BISQ_DATA_DIR=__BISQ_HOME__
BISQ_BASE_CURRENCY=btc_mainnet

# bisq seednode settings
BISQ_NODE_PORT=8000
BISQ_MAX_CONNECTIONS=50
BISQ_MAX_MEMORY=8000
BISQ_BASE_CURRENCY=BTC_MAINNET

# set to true for BSQ explorer
BISQ_DUMP_BLOCKCHAIN=false
12 changes: 5 additions & 7 deletions seednode/bisq-seednode.service
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@

[Unit]
Description=Bisq Seed Node
After=network.target
After=bitcoin.service

[Service]
EnvironmentFile=/etc/default/bisq-seednode.env
ExecStart=__BISQ_HOME__/__BISQ_REPO_NAME__/bisq-seednode --appName=${BISQ_APP_NAME} --nodePort=${BISQ_NODE_PORT} --userDataDir=${BISQ_DATA_DIR} --maxConnections=${BISQ_MAX_CONNECTIONS} --maxMemory=${BISQ_MAX_MEMORY} --fullDaoNode=true --rpcUser=${BITCOIN_RPC_USERNAME} --rpcPassword=${BITCOIN_RPC_PASSWORD} --rpcPort=${BITCOIN_RPC_PORT} --rpcBlockNotificationPort=${BITCOIN_RPC_BLOCKNOTIFY_PORT} --baseCurrencyNetwork=${BISQ_BASE_CURRENCY} --dumpBlockchainData=${BISQ_DUMP_BLOCKCHAIN}
ExecStart=__BISQ_HOME__/__BISQ_REPO_NAME__/bisq-seednode --appName=${BISQ_APP_NAME} --nodePort=${BISQ_NODE_PORT} --userDataDir=${BISQ_HOME} --maxConnections=${BISQ_MAX_CONNECTIONS} --maxMemory=${BISQ_MAX_MEMORY} --fullDaoNode=true --rpcUser=${BITCOIN_RPC_USERNAME} --rpcPassword=${BITCOIN_RPC_PASSWORD} --rpcPort=${BITCOIN_RPC_PORT} --rpcBlockNotificationPort=${BITCOIN_RPC_BLOCKNOTIFY_PORT} --baseCurrencyNetwork=${BISQ_BASE_CURRENCY} --dumpBlockchainData=${BISQ_DUMP_BLOCKCHAIN}
ExecStop=/bin/kill -TERM ${MAINPID}
Restart=on-failure

ExecStartPre=+/bin/bash -c "if [ $BISQ_DUMP_BLOCKCHAIN = true ];then mount -t tmpfs none -o size=812M,uid=bisq,gid=bisq $BISQ_HOME/$BISQ_APP_NAME/$BISQ_BASE_CURRENCY/db/json;else true;fi"
ExecStopPost=+/bin/bash -c "if [ $BISQ_DUMP_BLOCKCHAIN = true ];then umount $BISQ_HOME/$BISQ_APP_NAME/$BISQ_BASE_CURRENCY/db/json;else true;fi"

User=bisq
Group=bisq

PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target