Skip to content

Commit

Permalink
feat: add docs about deploying app (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 authored Jun 6, 2024
1 parent e57c59c commit ed44f08
Showing 1 changed file with 25 additions and 0 deletions.
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

0 comments on commit ed44f08

Please sign in to comment.