From ee3f633c62a8fe72f21e1affa96d2cf483b2b04b Mon Sep 17 00:00:00 2001 From: Harry Oh Date: Thu, 5 Oct 2023 11:01:34 +0900 Subject: [PATCH 1/3] [GSW-386] infra: gnoland, gnokey dockerfile --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70e2d01bf04..fe0cefb4513 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,12 +26,14 @@ RUN apt-get update && apt-get install -y expect ca-certificates && updat FROM runtime-base AS gnoland-slim WORKDIR /opt/gno/src/gno.land/ COPY --from=build /opt/build/build/gnoland /opt/gno/bin/ -ENTRYPOINT ["gnoland"] -EXPOSE 26657 36657 +COPY --from=build /opt/build/gno.land/genesis /opt/gno/src/gno.land/genesis +COPY --from=build /opt/build/examples /opt/gno/src/examples +COPY --from=build /opt/build/gnovm/stdlibs /opt/gno/src/gnovm/stdlibs +COPY --from=build /opt/build/gnovm/pkg /opt/gno/src/gnovm/pkg +EXPOSE 26657 FROM runtime-base AS gnokey-slim COPY --from=build /opt/build/build/gnokey /opt/gno/bin/ -ENTRYPOINT ["gnokey"] FROM runtime-base AS gno-slim COPY --from=build /opt/build/build/gno /opt/gno/bin/ From 91abd8f93cc6414f800945b3b588633a8e5bc6b4 Mon Sep 17 00:00:00 2001 From: Harry Oh Date: Thu, 5 Oct 2023 11:45:48 +0900 Subject: [PATCH 2/3] [GSW-386] infra: Add github action for building container images --- .github/workflows/public-for-swap.yml | 76 +++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/public-for-swap.yml diff --git a/.github/workflows/public-for-swap.yml b/.github/workflows/public-for-swap.yml new file mode 100644 index 00000000000..9258211271d --- /dev/null +++ b/.github/workflows/public-for-swap.yml @@ -0,0 +1,76 @@ + +name: Public gno for swap +on: + push: + branches: [ "gs/base_clean" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + gnoland: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set env + run: | + echo "GITSHA=${GITHUB_SHA::8}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + target: gnoland-slim + push: true + tags: | + gnoswap/gnoland:latest + gnoswap/gnoland:${{ env.GITSHA }} + + gnokey: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set env + run: | + echo "GITSHA=${GITHUB_SHA::8}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + target: gnokey-slim + push: true + tags: | + gnoswap/gnokey:latest + gnoswap/gnokey:${{ env.GITSHA }} From f242edff560046f24e6babdc40b4720a1fc32291 Mon Sep 17 00:00:00 2001 From: Harry Oh Date: Thu, 5 Oct 2023 14:24:28 +0900 Subject: [PATCH 3/3] [GSW-386] chore: rpc Default listening host is to be 0.0.0.0 --- tm2/pkg/bft/config/config.go | 2 +- tm2/pkg/bft/rpc/config/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tm2/pkg/bft/config/config.go b/tm2/pkg/bft/config/config.go index 6f148c3b5c1..29fc18e6fab 100644 --- a/tm2/pkg/bft/config/config.go +++ b/tm2/pkg/bft/config/config.go @@ -231,7 +231,7 @@ func DefaultBaseConfig() BaseConfig { PrivValidatorState: defaultPrivValStatePath, NodeKey: defaultNodeKeyPath, Moniker: defaultMoniker, - ProxyApp: "tcp://127.0.0.1:26658", + ProxyApp: "tcp://0.0.0.0:26658", ABCI: "socket", LogLevel: DefaultPackageLogLevels(), LogFormat: LogFormatPlain, diff --git a/tm2/pkg/bft/rpc/config/config.go b/tm2/pkg/bft/rpc/config/config.go index d0148badad1..e2347229868 100644 --- a/tm2/pkg/bft/rpc/config/config.go +++ b/tm2/pkg/bft/rpc/config/config.go @@ -88,7 +88,7 @@ type RPCConfig struct { // DefaultRPCConfig returns a default configuration for the RPC server func DefaultRPCConfig() *RPCConfig { return &RPCConfig{ - ListenAddress: "tcp://127.0.0.1:26657", + ListenAddress: "tcp://0.0.0.0:26657", CORSAllowedOrigins: []string{"*"}, CORSAllowedMethods: []string{http.MethodHead, http.MethodGet, http.MethodPost, http.MethodOptions}, CORSAllowedHeaders: []string{"Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"},