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

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

Loading…
Cancel
Save