Skip to content

Commit

Permalink
Merge pull request #365 from multiversx/update-rc-v1.4.9
Browse files Browse the repository at this point in the history
Merge
  • Loading branch information
iulianpascalau authored Feb 1, 2023
2 parents 959124e + 071682d commit 8e52baa
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 18 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
env:
IMAGE_NODE: chain-proxy
REGISTRY_HOSTNAME: multiversx

name: Build Docker image & push

on:
release:
types: [published]

jobs:
build-docker-image:
strategy:
matrix:
runs-on: [ubuntu-latest]
runs-on: ${{ matrix.runs-on }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Build image
run: |
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
cd ${GITHUB_WORKSPACE} && docker build -t "${REGISTRY_HOSTNAME}/${IMAGE_NODE}:${TAG_VERSION}" -f ./docker/Dockerfile .
- name: Push image
run: |
docker login --username ${{ secrets.DOCKERHUB_USERNAME }} --password ${{ secrets.DOCKERHUB_TOKEN }}
TAG_VERSION=${{ steps.get_version.outputs.VERSION }}
docker push "${REGISTRY_HOSTNAME}/${IMAGE_NODE}:${TAG_VERSION}"
docker logout
16 changes: 0 additions & 16 deletions Docker/Dockerfile

This file was deleted.

15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# mx-chain-proxy-go

The **MultiversX Proxy** acts as an entry point into the MultiversX blockchain.
The **MultiversX Proxy** acts as an entry point into the MultiversX Network.

![MultiversX Proxy - Architectural Overview](assets/overview.png "MultiversX Proxy - Architectural Overview")

For more details, go to [docs.multiversx.com](https://docs.multiversx.com/sdk-and-tools/proxy/).
For more details, go [here](https://docs.multiversx.com/sdk-and-tools/proxy/).

## Rest API endpoints

Expand Down Expand Up @@ -109,3 +109,14 @@ The rest of endpoints remain the same.
The faucet feature can be activated and users calling an endpoint will be able to perform requests that send a given amount of tokens to a specified address.

In order to use it, first set the `FaucetValue` from `config.toml` to a value higher than `0`. This will activate the feature. Then, provide a `walletKey.pem` file near `config.toml` file. This will make the `/transaction/send-user-funds` endpoint available.


## build docker image
```
docker image build . -t chain-proxy-local -f ./docker/Dockerfile
```

## run proxy with docker
```
docker run -p 8080:8080 chain-proxy-local --log-level "*:DEBUG"
```
Binary file modified assets/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM golang:1.17.6 as builder

WORKDIR /mx-chain-proxy-go
COPY . .

# Proxy
WORKDIR /mx-chain-proxy-go/cmd/proxy
RUN go build -ldflags="-X main.appVersion=$(git describe --tags --long --dirty) -X main.commitID=$(git rev-parse HEAD)"

# ===== SECOND STAGE ======
FROM ubuntu:22.04
RUN apt-get update -y && apt-get upgrade -y
COPY --from=builder /mx-chain-proxy-go/cmd/proxy /mx-chain-proxy-go/cmd/proxy

WORKDIR /mx-chain-proxy-go/cmd/proxy/
EXPOSE 8080
ENTRYPOINT ["./proxy"]

0 comments on commit 8e52baa

Please sign in to comment.