Files
nym/docker/wallet-web/entrypoint.sh
Bogdan-Ștefan Neacşu c0be2330b0 Docker testing env (#687)
* Add validator Docker container

* Add Docker contract upload container

Signed-off-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>

* Add docker-compose for validators and building deploy container

* One Docker image for each component

* Switch from hal to punk

* Add nym wallet docker

* Point web browser to the correct IP

* Better message parsing

* Rebase on the wallet merge

* Rename upload contract entrypoint script

* Remove unnecessary bash magic

* Put the contract image in the docker dir

* Put the wallet-web image in the docker dir

* Add some read-only specifiers to volumes

* Move typescript container code in docker directory

Also update lock files, as the containers work on a volume binded
to the local filesystem

* Fix volume permissions

* Add mnemonic echo

* Remove magic sleep value from secondary validator

* Adding README.md to the docker directory

* Change ENTRYPOINT to CMD for the typescript client image
2021-07-20 10:16:57 +01:00

23 lines
778 B
Bash
Executable File

#!/bin/sh
cd /wallet-web
yarn install
mkdir /wallet-copy
cp -r /wallet-web/* /wallet-copy
cd /wallet-copy
# Wait for the contract to be uploaded
while ! [ -s /contract_volume/contract_address ]; do
sleep 1
done
CONTRACT_ADDRESS=$(cat /contract_volume/contract_address)
sed -i 's/export const BONDING_CONTRACT_ADDRESS: string = "punk10pyejy66429refv3g35g2t7am0was7yalwrzen";/export const BONDING_CONTRACT_ADDRESS: string = "'"${CONTRACT_ADDRESS}"'";/' pages/_app.tsx
sed -i 's/export const VALIDATOR_URLS: string\[\] = \[/export const VALIDATOR_URLS: string\[\] = \[ "localhost:26657",/' pages/_app.tsx
sed -i 's/"https:\/\/testnet-milhon-validator1.nymtech.net",//' pages/_app.tsx
sed -i 's/"https:\/\/testnet-milhon-validator2.nymtech.net",//' pages/_app.tsx
yarn dev