Merge pull request #55 from tecnovert/rename_env

Rename docker/.env
2024-05-20_merge
tecnovert 10 months ago committed by GitHub
commit 73d4ade5f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      .gitignore
  2. 26
      doc/install.md
  3. 6
      doc/upgrade.md
  4. 2
      docker/example.env

1
.gitignore vendored

@ -12,3 +12,4 @@ __pycache__
# geckodriver.log
*.log
docker/.env

@ -30,12 +30,21 @@ Without this step you will need to preface each `docker-compose` command with `s
https://docs.docker.com/engine/install/linux-postinstall/
#### Create the images:
#### Copy the default environment file:
cd basicswap/docker
cp example.env .env
COINDATA_PATH can be set to your preference but must be exported each time you launch Basicswap.<br>
Consider adding COINDATA_PATH to the `.env` file in the docker directory file so it's always set.
export COINDATA_PATH=/var/data/coinswaps
#### (Optional) Set custom coin data path:
Coin-related files, such as blockchain and wallet files, are stored in `/var/data/coinswaps` by default. To use a different location, simply modify the target path in your `.env` file found within the `/docker` sub-folder.
cd basicswap/docker
nano .env
#### Create the images:
cd basicswap/docker
docker-compose build
@ -57,14 +66,12 @@ Append `--usebtcfastsync` to the below command to optionally initialise the Bitc
Setup with a local Monero daemon (recommended):
export COINDATA_PATH=/var/data/coinswaps
docker run --rm -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT
To instead use Monero public nodes and not run a local Monero daemon<br>(it can be difficult to find reliable public nodes):
Set XMR_RPC_HOST and BASE_XMR_RPC_PORT to a public XMR node.
export COINDATA_PATH=/var/data/coinswaps
docker run --rm -e XMR_RPC_HOST="node.xmr.to" -e BASE_XMR_RPC_PORT=18081 -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --withcoins=monero --htmlhost="0.0.0.0" --wshost="0.0.0.0" --xmrrestoreheight=$CURRENT_XMR_HEIGHT
@ -72,10 +79,6 @@ To instead use Monero public nodes and not run a local Monero daemon<br>(it can
**Mnemonics should be stored encrypted and/or air-gapped.**
And the output of `echo $CURRENT_XMR_HEIGHT` for use if you need to later restore your wallet.
#### Make COINDATA_PATH permanent (optional):
Edit the `.env` file in the docker directory and uncomment COINDATA_PATH line by deleting the hashtag.
#### Set the timezone (optional):
Edit the `.env` file in the docker directory, set TZ to your local timezone.
@ -84,7 +87,6 @@ Valid options can be listed with: `timedatectl list-timezones`
#### Start the container:
export COINDATA_PATH=/var/data/coinswaps
docker-compose up
Open in browser: `http://localhost:12700`
@ -94,7 +96,6 @@ Open in browser: `http://localhost:12700`
### Add a coin
docker-compose stop
export COINDATA_PATH=/var/data/coinswaps
docker run --rm -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --addcoin=bitcoin --usebtcfastsync
You can copy an existing pruned datadir (excluding bitcoin.conf and any wallets) over to `$COINDATA_PATH/bitcoin`
@ -103,7 +104,6 @@ Remove any existing wallets after copying over a pruned chain or the Bitcoin dae
With Encryption
export COINDATA_PATH=/var/data/coinswaps
docker run -e WALLET_ENCRYPTION_PWD=passwordhere --rm -t --name swap_prepare -v $COINDATA_PATH:/coindata i_swapclient basicswap-prepare --datadir=/coindata --addcoin=bitcoin --usebtcfastsync

@ -12,8 +12,6 @@ Update only the code (prepend sudo to each docker command if necessary):
basicswap]$ git pull
cd docker
export COINDATA_PATH=[PATH_TO]
(Probably export COINDATA_PATH=/var/data/coinswaps)
docker-compose build
docker-compose up
@ -21,7 +19,6 @@ If the dependencies have changed the container must be built with `--no-cache`:
basicswap]$ git pull
cd docker
export COINDATA_PATH=[PATH_TO]
docker-compose build --no-cache
docker-compose up
@ -30,8 +27,7 @@ If the dependencies have changed the container must be built with `--no-cache`:
After updating the code and rebuilding the container run:
basicswap/docker]$ export COINDATA_PATH=[PATH_TO]
$ docker-compose run --rm swapclient \
basicswap/docker]$ docker-compose run --rm swapclient \
basicswap-prepare --datadir=/coindata --preparebinonly --withcoins=monero,bitcoin

@ -1,5 +1,5 @@
HTML_PORT=127.0.0.1:12700:12700
WS_PORT=127.0.0.1:11700:11700
#COINDATA_PATH=/var/data/coinswaps
COINDATA_PATH=/var/data/coinswaps
TOR_PROXY_HOST=172.16.238.200
TZ=UTC
Loading…
Cancel
Save