Skip to content

Commit

Permalink
Fix readme env (#72)
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Viénot <[email protected]>
  • Loading branch information
svienot authored and Nana-EC committed Nov 17, 2023
1 parent 3fb136a commit 0486da6
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ From the root of the project workspace:
1. Run `npm ci`. This will create populate and link `node_modules`.
2. `cp environments/.env.dev.hedera environments/.env`
3. Make sure the following variables defined in `.env` point to directories which exist on the file system: `REPOSITORY_PATH, SOLC_REPO, SOLJSON_REPO` (paths relative to the environments/ directory)
4. Run `npx lerna bootstrap && npx lerna run build`. This will build the server and ui as well as needed libraries.
5. Run `docker-compose -f environments/build-repository.yaml build`. This will build the docker image for the repository service.
4. `cp environments/example-docker-config.json environments/docker-config.json`
* Adjust as needed. With local build, this is used by the repository container, which only needs the SERVER_URL
5. Run `npx lerna bootstrap && npx lerna run build`. This will build the server and ui as well as needed libraries.
6. Run `docker-compose -f environments/build-repository.yaml build`. This will build the docker image for the repository service.

### Run

Expand All @@ -44,7 +46,7 @@ From the root of the project workspace:
This assumes the default ports (per .env.dev.hedera) are used:

* `Open http://localhost:10000`. This should open the Repository select-contract-form. The options available for the Chain should be the 3 Hedera networks (mainnet, testnet, previewnet).
* `Open http://localhost:5555/chains`. This should return a JSON value containing the 3 Hedera networks
* `Open http://localhost:5002/chains`. This should return a JSON value containing the 3 Hedera networks
* `Open http://localhost:5555/files/contracts/296`. This should return a JSON value containing the addresses of all contracts verified on testnet (or report error "_Contracts have not been found!_" if nothing has been verified yet)
* `Open http://localhost:3000`. This should bring up the Verifier page.

Expand All @@ -64,9 +66,9 @@ or build the images locally.

### Pulling pre-built images

* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:ui-latest`
* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:server-latest`
* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:repository-latest`
* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:ui-main`
* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:server-main`
* Run `docker pull ghcr.io/hashgraph/hedera-sourcify:repository-main`
* Then follow _Run_ step below.

### Build images
Expand Down
2 changes: 1 addition & 1 deletion environments/.env.dev.hedera
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ REPOSITORY_SERVER_EXTERNAL_PORT=10000

# Other config
TESTING=false
TAG=latest
TAG=main
NODE_ENV=development
USE_LOCAL_NODE=true

Expand Down
2 changes: 1 addition & 1 deletion environments/.env.docker.hedera
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ REPOSITORY_SERVER_EXTERNAL_PORT=10000

# Other config
TESTING=false
TAG=latest
TAG=main

# Needed to call create2 APIs, format is: TOKEN1,TOKEN2,...
CREATE2_CLIENT_TOKENS=
12 changes: 6 additions & 6 deletions environments/docker-compose-hedera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ services:

repository:
<<: *project-base
image: ghcr.io/hashgraph/hedera-sourcify:repository-latest
container_name: repository-latest
image: ghcr.io/hashgraph/hedera-sourcify:repository-${TAG}
container_name: repository-${TAG}
volumes:
- <<: *project-repository-mount
target: /data
Expand All @@ -31,8 +31,8 @@ services:

server:
<<: *project-base
image: ghcr.io/hashgraph/hedera-sourcify:server-latest
container_name: server-latest
image: ghcr.io/hashgraph/hedera-sourcify:server-${TAG}
container_name: server-${TAG}
ports:
- "${SERVER_EXTERNAL_PORT}:${SERVER_PORT}"
volumes:
Expand All @@ -52,8 +52,8 @@ services:

ui:
<<: *project-base
image: ghcr.io/hashgraph/hedera-sourcify:ui-latest
container_name: ui-latest
image: ghcr.io/hashgraph/hedera-sourcify:ui-${TAG}
container_name: ui-${TAG}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
Expand Down
10 changes: 9 additions & 1 deletion environments/example-docker-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"SERVER_URL": "http://localhost:5002",
"REPOSITORY_SERVER_URL": "http://localhost:10000",
"EXPLORER_URL": "http://localhost:8080"
"EXPLORER_URL": "http://localhost:8080",
"BRAND_PRODUCT_LOGO_URL": "",
"TERMS_OF_SERVICE_URL": "",
"REMOTE_IMPORT": false,
"GITHUB_IMPORT": false,
"CONTRACT_IMPORT": false,
"JSON_IMPORT": false,
"OPEN_IN_REMIX": false,
"CREATE2_VERIFICATION": false
}

0 comments on commit 0486da6

Please sign in to comment.