improving wallet runtime

master
lza_menace 2 years ago
parent 9979b67ab2
commit abcdebf7e3

@ -0,0 +1,4 @@
.venv
data
nerochan
.env

@ -2,6 +2,7 @@
export RPC_CREDS="${2}"
export DAEMON_ADDRESS="${3}"
export WALLET_FILE=/data/wallet
# Define the network we plan to operate our wallet in
if [[ "${1}" == "stagenet" ]]; then
@ -16,9 +17,9 @@ else
fi
# Create new wallet if it doesn't exist
if [[ ! -d /data/wallet ]]; then
if [[ ! -d ${WALLET_FILE} ]]; then
monero-wallet-cli ${NETWORK} \
--generate-new-wallet /data/wallet \
--generate-new-wallet ${WALLET_FILE} \
--daemon-address ${DAEMON_ADDRESS} \
--trusted-daemon \
--use-english-language-names \
@ -28,11 +29,11 @@ fi
# Run RPC wallet
monero-wallet-rpc ${NETWORK} \
--daemon-address ${DAEMON_ADDRESS} \
--wallet-file /data/wallet \
--wallet-file ${WALLET_FILE} \
--password "" \
--rpc-login ${RPC_CREDS} \
--rpc-bind-port 8000 \
--rpc-bind-ip 0.0.0.0 \
--confirm-external-bind \
--log-file /data/wallet-rpc.log \
--log-file ${WALLET_FILE}-rpc.log \
--trusted-daemon

@ -4,9 +4,12 @@ services:
build:
context: .
dockerfile: Dockerfile-monero
restart: always
ports:
- 127.0.0.1:${XMR_WALLET_RPC_PORT:-8000}:${XMR_WALLET_RPC_PORT:-8000}
volumes:
- ${DATA_DIR:-./data/wallet}:/data
- wallet
command:
bash /run_wallet.sh "${XMR_WALLET_NETWORK}" "${XMR_WALLET_RPC_USER}:${XMR_WALLET_RPC_PASS}" "${XMR_DAEMON_URI}"
volumes:
wallet:

Loading…
Cancel
Save