diff --git a/web/cashtab/Dockerfile b/web/cashtab/Dockerfile index d25facf65..887c7faf4 100644 --- a/web/cashtab/Dockerfile +++ b/web/cashtab/Dockerfile @@ -1,27 +1,27 @@ # Multi-stage # 1) Node image for building frontend assets # 2) nginx stage to serve frontend assets # Stage 1 FROM node:15-buster-slim AS builder # Set working directory WORKDIR /app # Copy all files from current directory to working dir in image COPY . . # Install git, required for installing some npm modules RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y git && \ apt-get install -y python # install node modules and build assets -RUN npm install --legacy-peer-deps && npm run build +RUN npm install && npm run build # Stage 2 FROM nginx COPY nginx.conf /etc/nginx/conf.d/default.conf # Set working directory to nginx asset directory # Copy static assets from builder stage COPY --from=builder /app/build /usr/share/nginx/html/ EXPOSE 80 # Containers run nginx with global directives and daemon off ENTRYPOINT ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/web/cashtab/README.md b/web/cashtab/README.md index 6bc95d656..89dc14f7b 100644 --- a/web/cashtab/README.md +++ b/web/cashtab/README.md @@ -1,99 +1,97 @@ # CashTab ## Bitcoin Cash Web Wallet ### Features - Send & Receive BCH - Import existing wallets ## Development -CashTab relies on some modules that retain legacy dependencies. NPM version 7 or later no longer supports automatic resolution of these peer dependencies. To successfully install modules such as `qrcode.react`, with NPM > 7, run `npm install` with the flag `--legacy-peer-deps` - ``` -npm install --legacy-peer-deps +npm install npm start ``` Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.
You will also see any lint errors in the console. ## Testing Run the tests in watch mode (interactive): ``` npm test ``` Run the tests and generate a coverage report (non-interactive): ``` npm run test:coverage ``` You can then browse the HTML coverage report by opening the `coverage/lcov-report/index.html` file in your web browser. ## Production In the project directory, run: ``` npm run build ``` Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.
Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ## Browser Extension 1. `npm run extension` 2. Open Chrome or Brave 3. Navigate to `chrome://extensions/` (or `brave://extensions/`) 4. Enable Developer Mode 5. Click "Load unpacked" 6. Select the `extension/dist` folder that was created with `npm run extension` ## Docker deployment ``` -npm install --legacy-peer-deps +npm install docker-compose build docker-compose up ``` ## Redundant APIs CashTab accepts multiple instances of `bch-api` as its backend. Input your desired API URLs separated commas into the `REACT_APP_BCHA_APIS` variable. For example, to run CashTab with three redundant APIs, use: ``` REACT_APP_BCHA_APIS=https://rest.kingbch.com/v3/,https://wallet-service-prod.bitframe.org/v3/,https://free-main.fullstack.cash/v3/ ``` You can also run CashTab with a single API, e.g. ``` REACT_APP_BCHA_APIS=https://rest.kingbch.com/v3/ ``` CashTab will start with the first API in your list. If it receives an error from that API, it will try the next one. Navigate to `localhost:8080` to see the app. ## CashTab Roadmap The following features are under active development: - Transaction history - Simple Ledger Postage Protocol Support - CashTab browser extension