From 0e82391cc09157a002c0c0dc5faf35a6708a84b2 Mon Sep 17 00:00:00 2001 From: Jorge Silva Date: Tue, 7 Mar 2023 10:17:13 +0000 Subject: [PATCH 1/3] fix local-setup docs --- tools/local-setup/README.md | 25 +++++++++---------------- tools/local-setup/docker-compose.yml | 7 +++---- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/tools/local-setup/README.md b/tools/local-setup/README.md index 0315d2f81e..b7bec8e1d4 100644 --- a/tools/local-setup/README.md +++ b/tools/local-setup/README.md @@ -7,12 +7,13 @@ setup. ### Starting -**Note** You need to build the wasp container using `build_container.sh` if -you're on Mac/Linux or `build_container.cmd` on windows so that the `wasp` -version is properly set. +Run `docker-compose pull` to fetch the dependencies. Run `docker-compose up` to start the setup. +After startup, you should be able to see the wasp dashboard on: +http://localhost/wasp/dashboard/ + ### Stopping Press `Ctrl-C` to shut down the setup, but don't press it twice to force it. @@ -25,12 +26,9 @@ You can also shut down the setup with `docker-compose down` in a new terminal. Run `docker-compose down --volumes` to shut down the nodes and to remove all databases. -### Recreation - -If you made changes to the Wasp code and want to use it inside the setup, you -need to recreate the Wasp image. +### Re-build -Run `docker-compose build` +If you made changes to the Wasp code and want to use it inside the setup, you can re-build the Wasp image using `build_container.sh` or `build_container.cmd`. ## Ports @@ -46,14 +44,9 @@ The nodes will then be reachable under these ports: ## Wasp-cli setup -To configure a new wasp-cli you can use the following commands: - -:::note - -You can either use a wasp-cli installed on your system, or use the one built-in -to the wasp docker container by doing: `docker exec wasp /app/wasp-cli init` +Download the wasp cli from the [releases page](https://github.com/iotaledger/wasp/releases) -::: +To configure a new wasp-cli you can use the following commands: ```shell wasp-cli init @@ -66,7 +59,7 @@ To create a chain: ```shell wasp-cli request-funds -wasp-cli chain deploy --nodes=0 --quorum=1 --chain=testchain --description="Test Chain" +wasp-cli chain deploy --chain=testchain ``` After a chain has been created, the EVM JSON-RPC can be accessed via: diff --git a/tools/local-setup/docker-compose.yml b/tools/local-setup/docker-compose.yml index 796ab92b27..b3c4badd43 100644 --- a/tools/local-setup/docker-compose.yml +++ b/tools/local-setup/docker-compose.yml @@ -1,6 +1,5 @@ version: "3.9" services: - ##################################################### # Reverse Proxy (needed to rewrite dashboard route) # ##################################################### @@ -18,7 +17,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" ############### - # HORNET nest # + # HORNET nest # ############### hornet-nest: @@ -65,17 +64,17 @@ services: - ALL ######## - # WASP # + # WASP # ######## wasp: container_name: wasp image: iotaledger/wasp:latest + build: context: ../../ dockerfile: Dockerfile.noncached args: - BUILD_TAGS: "${BUILD_TAGS:-rocksdb}" BUILD_LD_FLAGS: "${BUILD_LD_FLAGS:--X=github.com/iotaledger/wasp/core/app.Version=v0.0.0-testing}" ulimits: nofile: From a3c2998d43b3fd5a8c33e946b11653c3d4fd717e Mon Sep 17 00:00:00 2001 From: Jorge Silva Date: Tue, 7 Mar 2023 10:19:06 +0000 Subject: [PATCH 2/3] fix CI push to dockerhub latest tag --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b38d105b1..7a8af78434 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,7 +108,7 @@ jobs: file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }},iotaledger/wasp:latest labels: ${{ steps.meta.outputs.labels }} build-args: | BUILD_LD_FLAGS=-X=github.com/iotaledger/wasp/core/app.Version=${{ steps.tagger.outputs.tag }} From ccedce05a943b675d2e85d856f18b62a55a15741 Mon Sep 17 00:00:00 2001 From: Jorge Silva Date: Tue, 7 Mar 2023 10:31:21 +0000 Subject: [PATCH 3/3] change wasp restart policy on local-setup --- tools/local-setup/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/local-setup/docker-compose.yml b/tools/local-setup/docker-compose.yml index b3c4badd43..53158324dc 100644 --- a/tools/local-setup/docker-compose.yml +++ b/tools/local-setup/docker-compose.yml @@ -80,7 +80,7 @@ services: nofile: soft: 16384 hard: 16384 - restart: on-failure:10 + restart: on-failure:1 stop_grace_period: 5m depends_on: traefik: