Updated build instructions

This commit is contained in:
Willian Mitsuda 2021-07-14 18:10:07 -03:00
parent 772904c527
commit 54bc06a7ad
2 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,7 @@ Clone Otterscan repo and its submodules. Checkout the tag corresponding to your
git clone --recurse-submodules git@github.com:wmitsuda/otterscan.git
cd otterscan
git checkout <version-tag-otterscan>
docker build -t otterscan -f Dockerfile .
DOCKER_BUILDKIT=1 docker build -t otterscan -f Dockerfile .
```
This will run the entire build process inside a build container, merge the production build of the React app with the 4bytes and trustwallet assets into the same image format it is published in Docker Hub, but locally under the name `otterscan`.
@ -47,13 +47,13 @@ By default, it assumes your Erigon `rpcdaemon` processs is serving requests at `
Start serving 4bytes and trustwallet assets at `localhost:3001` using a dockerized nginx:
```
npm run start-assets
npm run assets-start
```
To stop it, run:
```
npm run stop-assets
npm run assets-stop
```
To run Otterscan development build:

View File

@ -43,11 +43,11 @@
"build": "craco build",
"test": "craco test",
"eject": "react-scripts eject",
"start-assets": "docker run --rm -p 3001:80 --name otterscan-assets -d -v$(pwd)/4bytes/signatures:/usr/share/nginx/html/signatures/ -v$(pwd)/trustwallet/blockchains/ethereum/assets:/usr/share/nginx/html/assets -v$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf nginx:1.21.1-alpine",
"stop-assets": "docker stop otterscan-assets",
"build-docker": "DOCKER_BUILDKIT=1 docker build -t otterscan -f Dockerfile .",
"start-docker": "docker run --rm -p 5000:80 --name otterscan -d otterscan",
"stop-docker": "docker stop otterscan"
"assets-start": "docker run --rm -p 3001:80 --name otterscan-assets -d -v$(pwd)/4bytes/signatures:/usr/share/nginx/html/signatures/ -v$(pwd)/trustwallet/blockchains/ethereum/assets:/usr/share/nginx/html/assets -v$(pwd)/nginx.conf:/etc/nginx/conf.d/default.conf nginx:1.21.1-alpine",
"assets-stop": "docker stop otterscan-assets",
"docker-build": "DOCKER_BUILDKIT=1 docker build -t otterscan -f Dockerfile .",
"docker-start": "docker run --rm -p 5000:80 --name otterscan -d otterscan",
"docker-stop": "docker stop otterscan"
},
"eslintConfig": {
"extends": [