diff --git a/.gitignore b/.gitignore index 25703564b2..e05a7c5ba5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ */**/*tx_database* */**/*dapps* build/_vendor/pkg - +privatenet/ #* .#* *# diff --git a/README.md b/README.md index 385a80ec61..d173086066 100644 --- a/README.md +++ b/README.md @@ -301,11 +301,19 @@ If you would like to reinitialize/rebuild the docker images you can issue the fo `docker-compose up --build` -The Postgresql Database Container will persist the database data to the the pg-data/ directory. So if you do want to reinitialize the database you should delete the content of this directory prior to launching the docker containers. From your local machine you can view the database by connecting to the database in the container at 127.0.0.1:8001. To access the shyftBlockExplorer open a browser and visit http://localhost:3000 +To rebuild any one of the services - issue the following commands: -Blockchain data is persisted to ~/.ethash so if you would like to reset the test blockchain you will need to delete the ~/.ethash directory. +``` +docker-compose up -d --no-deps --build -The docker container for the ShyftBlockExplorerApi utilizes govendor to minimize its image size. As a result, if you would like the docker image for this container to reflect any uncommitted changes which may have occurred in the go-empyrean repository, especially changes with respect to go-empyrean core (ie. cryptographic functions and database). Prior to launching the docker containers you should rebuild the vendor directory for the shyftBlockExplorerApi - by executing the following steps: +# ie. for shyftBlockExplorerApi: +# docker-compose up -d --no-deps --build shyft_block_api +``` +__The Postgresql Database Container will persist the database data to the the ./pg-data directory__. So if you do want to reinitialize the database you should delete the content of this directory prior to launching the docker containers. From your local machine you can view the database by connecting to the database in the container at 127.0.0.1:8001. To access the shyftBlockExplorer open a browser and visit http://localhost:3000 + +__Blockchain data is persisted to ./privatenet/.ethash__. If you would like to reset the test blockchain you will need to delete the ./privatenet directory. + +The docker container for the ShyftBlockExplorerApi utilizes govendor to minimize its image size. __If you would like the docker image for this container to reflect any uncommitted changes which may have occurred in the go-empyrean repository, ie. changes with respect to go-empyrean core (ie. cryptographic functions and database). Prior to launching the docker containers you should rebuild the vendor directory for the shyftBlockExplorerApi - by executing the following steps:__ ``` # remove existing shyftBlockExplorerApi vendor.json and vendored components: @@ -329,8 +337,6 @@ govendor fetch github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ ``` - - NB: The Shyft Geth docker image size is 1+ GB so make sure you have adequate space on your disk drive/ _TODO_ diff --git a/config.toml b/config.toml index 0caa102097..fd1a8a1734 100644 --- a/config.toml +++ b/config.toml @@ -11,7 +11,7 @@ EnablePreimageRecording = false CacheDir = "ethash" CachesInMem = 2 CachesOnDisk = 3 -DatasetDir = "~/.ethash" +DatasetDir = "./privatenet/.ethash" DatasetsInMem = 1 DatasetsOnDisk = 2 PowMode = 0 diff --git a/containers/docker/develop-alpine/shyftUi/Dockerfile b/containers/docker/develop-alpine/shyftUi/Dockerfile index 841dff4966..10cc2171c7 100644 --- a/containers/docker/develop-alpine/shyftUi/Dockerfile +++ b/containers/docker/develop-alpine/shyftUi/Dockerfile @@ -9,9 +9,13 @@ WORKDIR /usr/src/shyftBlockExplorerUI ENV PATH /usr/src/shyftBlockExplorerUI/node_modules/.bin:$PATH # install and cache app dependencies -COPY ./shyftBlockExplorerUI /usr/src/shyftBlockExplorerUI +COPY ./shyftBlockExplorerUI/package.json /usr/src/shyftBlockExplorerUI/package.json RUN npm install # RUN npm add react-scripts@1.1.1 -g --silent +COPY ./shyftBlockExplorerUI/src /usr/src/shyftBlockExplorerUI/src +COPY ./shyftBlockExplorerUI/scripts /usr/src/shyftBlockExplorerUI/scripts +COPY ./shyftBlockExplorerUI/config /usr/src/shyftBlockExplorerUI/config +COPY ./shyftBlockExplorerUI/public /usr/src/shyftBlockExplorerUI/public # start app diff --git a/docker-compose.yml b/docker-compose.yml index de2b37a2e7..4c4c75ff49 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -53,7 +53,8 @@ services: - shyftnet command: > sh -c ' - pwd && ls -a && cd vendor/ && ls -a && cat vendor.json && cd ../ && + pwd && govendor remove github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ && + govendor fetch github.com/ShyftNetwork/go-empyrean/crypto/secp256k1/^ && /wait-for.sh pg:5432 && DBENV=docker export DBENV && go run -v *.go'