Skip to content

Commit

Permalink
Merge pull request #66 from Zondax/dev
Browse files Browse the repository at this point in the history
New Release
  • Loading branch information
emmanuelm41 authored Jun 6, 2024
2 parents a0f120c + 0b27767 commit f549295
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 3,457 deletions.
2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: ./.yarn/releases/yarn-4.1.0.cjs
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,31 @@ Detailed Docker commands:
- **Build Docker Image**: `yarn docker:build`
- **Run Docker Container**: `yarn docker:run`

## Deploying
Sure, here is a revised version of your instructions:

### Obtain the Image
you can build the image or pull it from the [Zondax Docker Hub](https://hub.docker.com/repository/docker/zondax/ledger-polkadot-generic-api/general).

### Create the File with Supported Chains
Refer to the `chains.yaml` file in this repository as an example. The file should include:
- **name**: The name of the chain.
- **id**: A fixed value used by API clients to select a specific chain from the available options.
- **url**: The node URL of the chain.

### Run the Docker Image
You need to take several steps into consideration:
- Mount the `chains.yaml` file at the `/app` directory. The file path should be `/app/chains.yaml`.
- Expose port 3001 to enable the service to function.

As an example, this would be the command to run a new container:
```bash
docker run -p 3001:3001 -v /path/to/your/chains.yaml:/app/chains.yaml zondax/ledger-polkadot-generic-api
```

## Consuming the API
You can please review the OpenAPI spec where each available endpoint is described. You can check jest tests as well.

## Contributing
Guidelines for how to contribute to the project. You can detail how to fork the repository, create a new branch, make changes, and pull requests.

Expand Down
3 changes: 2 additions & 1 deletion earthly-dockerfile/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ WORKDIR /app
RUN corepack enable

# Copy package.json, yarn.lock
COPY package.json yarn.lock ./
COPY package.json yarn.lock .yarnrc.yml ./
COPY .yarn ./.yarn

# Install production dependencies only
RUN yarn workspaces focus --production
Expand Down
Loading

0 comments on commit f549295

Please sign in to comment.