From 4adfb36eab063be470d258378d7c05ff047b7dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Vi=C3=A9not?= Date: Tue, 14 Nov 2023 23:14:28 +0100 Subject: [PATCH] Fix readme env (#72) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Simon ViƩnot --- README.md | 14 ++++++++------ environments/.env.dev.hedera | 2 +- environments/.env.docker.hedera | 2 +- environments/docker-compose-hedera.yaml | 12 ++++++------ environments/example-docker-config.json | 10 +++++++++- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 4c0c2c8a..9cec3155 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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. @@ -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 diff --git a/environments/.env.dev.hedera b/environments/.env.dev.hedera index 7847b784..b7fdef18 100644 --- a/environments/.env.dev.hedera +++ b/environments/.env.dev.hedera @@ -35,7 +35,7 @@ REPOSITORY_SERVER_EXTERNAL_PORT=10000 # Other config TESTING=false -TAG=latest +TAG=main NODE_ENV=development USE_LOCAL_NODE=true diff --git a/environments/.env.docker.hedera b/environments/.env.docker.hedera index 2b191dbc..edb4b07a 100644 --- a/environments/.env.docker.hedera +++ b/environments/.env.docker.hedera @@ -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= diff --git a/environments/docker-compose-hedera.yaml b/environments/docker-compose-hedera.yaml index 904089b6..caaa2779 100644 --- a/environments/docker-compose-hedera.yaml +++ b/environments/docker-compose-hedera.yaml @@ -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 @@ -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: @@ -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 diff --git a/environments/example-docker-config.json b/environments/example-docker-config.json index db89531d..c2853343 100644 --- a/environments/example-docker-config.json +++ b/environments/example-docker-config.json @@ -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 } \ No newline at end of file