mirror of
https://github.com/basicswap/basicswap.git
synced 2024-11-16 15:58:17 +00:00
docker: Update templates for BCH.
This commit is contained in:
parent
283cfc7c59
commit
ca5b9e5e00
10 changed files with 47 additions and 25 deletions
|
@ -1972,8 +1972,8 @@ def main():
|
|||
chainclients['bitcoin']['rpcuser'] = BTC_RPC_USER
|
||||
chainclients['bitcoin']['rpcpassword'] = BTC_RPC_PWD
|
||||
if BCH_RPC_USER != '':
|
||||
chainclients['bitcoin']['rpcuser'] = BCH_RPC_USER
|
||||
chainclients['bitcoin']['rpcpassword'] = BCH_RPC_PWD
|
||||
chainclients['bitcoincash']['rpcuser'] = BCH_RPC_USER
|
||||
chainclients['bitcoincash']['rpcpassword'] = BCH_RPC_PWD
|
||||
if XMR_RPC_USER != '':
|
||||
chainclients['monero']['rpcuser'] = XMR_RPC_USER
|
||||
chainclients['monero']['rpcpassword'] = XMR_RPC_PWD
|
||||
|
|
|
@ -1502,7 +1502,7 @@ class BTCInterface(Secp256k1Interface):
|
|||
'amount': txjs['vout'][n]['value']
|
||||
}
|
||||
|
||||
def inspectSwipeTx(self, tx: dict) -> bytes | None:
|
||||
def inspectSwipeTx(self, tx: dict):
|
||||
mercy_keyshare = None
|
||||
for vout in tx['vout']:
|
||||
script_bytes = bytes.fromhex(vout['scriptPubKey']['hex'])
|
||||
|
|
|
@ -8,20 +8,20 @@ RUN basicswap-prepare --preparebinonly --bindir=/coin_bin --withcoin=bitcoincash
|
|||
FROM debian:bullseye-slim
|
||||
COPY --from=install_stage /coin_bin .
|
||||
|
||||
ENV BITCOIN_DATA /data
|
||||
ENV BITCOINCASH_DATA /data
|
||||
|
||||
RUN groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin \
|
||||
RUN groupadd -r bitcoincash && useradd -r -m -g bitcoincash bitcoincash \
|
||||
&& apt-get update \
|
||||
&& apt-get install -qq --no-install-recommends gosu \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& mkdir "$BITCOIN_DATA" \
|
||||
&& chown -R bitcoin:bitcoin "$BITCOIN_DATA" \
|
||||
&& ln -sfn "$BITCOIN_DATA" /home/bitcoin/.bitcoin \
|
||||
&& chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
|
||||
&& mkdir "$BITCOINCASH_DATA" \
|
||||
&& chown -R bitcoincash:bitcoincash "$BITCOINCASH_DATA" \
|
||||
&& ln -sfn "$BITCOINCASH_DATA" /home/bitcoincash/.bitcoincash \
|
||||
&& chown -h bitcoincash:bitcoincash /home/bitcoincash/.bitcoincash
|
||||
VOLUME /data
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
EXPOSE 8332 8333 18332 18333 18443 18444
|
||||
CMD ["/bitcoin/bitcoind", "--datadir=/data"]
|
||||
CMD ["/bitcoincash/bitcoind", "--datadir=/data"]
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
set -e
|
||||
|
||||
if [[ "$1" == "bitcoin-cli" || "$1" == "bitcoin-tx" || "$1" == "bitcoind" || "$1" == "test_bitcoin" ]]; then
|
||||
mkdir -p "$BITCOIN_DATA"
|
||||
mkdir -p "$BITCOINCASH_DATA"
|
||||
|
||||
chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
|
||||
exec gosu bitcoin "$@"
|
||||
chown -h bitcoincash:bitcoincash /home/bitcoincash/.bitcoincash
|
||||
exec gosu bitcoincash "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
|
|
16
docker/production/compose-fragments/1_bitcoincash.yml
Normal file
16
docker/production/compose-fragments/1_bitcoincash.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
bitcoincash_core:
|
||||
image: i_bitcoincash
|
||||
build:
|
||||
context: bitcoincash
|
||||
dockerfile: Dockerfile
|
||||
container_name: bitcoincash_core
|
||||
volumes:
|
||||
- ${DATA_PATH}/bitcoincash:/data
|
||||
expose:
|
||||
- ${BCH_RPC_PORT}
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
restart: unless-stopped
|
|
@ -7,7 +7,7 @@
|
|||
volumes:
|
||||
- ${DATA_PATH}/wownero_daemon:/data
|
||||
expose:
|
||||
- ${BASE_WOW_RPC_PORT}
|
||||
- ${WOW_RPC_PORT}
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
- ${DATA_PATH}/pivx:/data/pivx
|
||||
- ${DATA_PATH}/dash:/data/dash
|
||||
- ${DATA_PATH}/firo:/data/firo
|
||||
- ${DATA_PATH}/bitcoincash:/data/bitcoincash
|
||||
environment:
|
||||
- TZ
|
||||
- BSX_DOCKER_MODE
|
||||
|
@ -50,8 +51,8 @@
|
|||
- DEFAULT_XMR_RESTORE_HEIGHT
|
||||
- WOW_DATA_DIR
|
||||
- WOW_RPC_HOST
|
||||
- BASE_WOW_RPC_PORT
|
||||
- BASE_WOW_ZMQ_PORT
|
||||
- WOW_RPC_PORT
|
||||
- WOW_ZMQ_PORT
|
||||
- WOW_WALLETS_DIR
|
||||
- WOW_WALLET_RPC_HOST
|
||||
- WOW_WALLET_RPC_PORT
|
||||
|
@ -73,4 +74,9 @@
|
|||
- FIRO_RPC_PORT
|
||||
- FIRO_RPC_USER
|
||||
- FIRO_RPC_PWD
|
||||
- BCH_DATA_DIR
|
||||
- BCH_RPC_HOST
|
||||
- BCH_RPC_PORT
|
||||
- BCH_RPC_USER
|
||||
- BCH_RPC_PWD
|
||||
restart: "no"
|
||||
|
|
|
@ -21,12 +21,6 @@ BTC_RPC_PORT=19796
|
|||
BTC_RPC_USER=bitcoin_user
|
||||
BTC_RPC_PWD=bitcoin_pwd
|
||||
|
||||
BCH_DATA_DIR=/data/bitcoincash
|
||||
BCH_RPC_HOST=bitcoincash_core
|
||||
BCH_RPC_PORT=19797
|
||||
BCH_RPC_USER=bitcoincash_user
|
||||
BCH_RPC_PWD=bitcoincash_pwd
|
||||
|
||||
LTC_DATA_DIR=/data/litecoin
|
||||
LTC_RPC_HOST=litecoin_core
|
||||
LTC_RPC_PORT=19795
|
||||
|
@ -78,3 +72,9 @@ FIRO_RPC_HOST=firo_core
|
|||
FIRO_RPC_PORT=8888
|
||||
FIRO_RPC_USER=firo_user
|
||||
FIRO_RPC_PWD=firo_pwd
|
||||
|
||||
BCH_DATA_DIR=/data/bitcoincash
|
||||
BCH_RPC_HOST=bitcoincash_core
|
||||
BCH_RPC_PORT=19797
|
||||
BCH_RPC_USER=bitcoincash_user
|
||||
BCH_RPC_PWD=bitcoincash_pwd
|
||||
|
|
|
@ -165,7 +165,7 @@ Prepare config files:
|
|||
|
||||
export ADD_COIN=monero
|
||||
docker-compose -f docker-compose-prepare.yml run --rm swapprepare \
|
||||
basicswap-prepare --nocores --usecontainers --addcoin=${ADD_COIN} --htmlhost="0.0.0.0" --particl_mnemonic=none
|
||||
basicswap-prepare --nocores --usecontainers --addcoin=${ADD_COIN} --particl_mnemonic=none
|
||||
|
||||
|
||||
Prepare wallet:
|
||||
|
@ -177,7 +177,7 @@ Prepare wallet:
|
|||
|
||||
docker-compose -f docker-compose-prepare.yml run -e WALLET_ENCRYPTION_PWD=walletpass \
|
||||
--rm swapprepare \
|
||||
basicswap-prepare --initwalletsonly --withoutcoin=particl --withcoin=monero
|
||||
basicswap-prepare --initwalletsonly --withoutcoin=particl --withcoin=${ADD_COIN}
|
||||
|
||||
docker-compose -f docker-compose-prepare.yml stop
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ ENV LANG=C.UTF-8 \
|
|||
|
||||
RUN apt-get update; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
python3-pip libpython3-dev gnupg pkg-config gcc libc-dev gosu tzdata;
|
||||
python3-pip libpython3-dev gnupg pkg-config gcc libc-dev gosu tzdata wget unzip;
|
||||
|
||||
ARG BASICSWAP_URL=https://github.com/basicswap/basicswap/archive/master.zip
|
||||
ARG BASICSWAP_DIR=basicswap-master
|
||||
|
|
Loading…
Reference in a new issue