Skip to content

Conversation

Pantani
Copy link
Collaborator

@Pantani Pantani commented Apr 18, 2025

close #4527

Description

In your main config.yml, use the include field to reference other local or remote YAML files.
It allows you to split your chain configuration across multiple files, making it easier to manage and reuse configuration parts.

version: 1
include:
  - "./accounts.yml"
  - "./validators.yml"

Include remote files via URL or server path are also valid:

version: 1
include:
  - "localhost:3045/accounts.yml"
  - "https://ignite.com/config/validators.yml"

Common Use Cases:

Split your config into a base setup and an external accounts.yml for better separation of concerns:

  • config.yml
version: 1
include:
  - "./accounts.yml"
client:
  typescript:
    path: ts-client
  • accounts.yml
accounts:
  - name: alice
    coins:
      - 20000token
      - 200000000stake
  - name: bob
    coins:
      - 20000token
      - 200000000stake
faucet:
  name: alice
  coins:
    - 5token
    - 100000stake

@github-actions github-actions bot added component:docs Documentation additions or improvements. component:ci CI/CD workflow and automated jobs. component:configs type:internal labels Apr 18, 2025
Copy link
Contributor

github-actions bot commented Apr 18, 2025

Visit the preview URL for this PR (updated for commit 796e7f6):

https://igntservices-docs--pr4638-feat-include-config-xfktzpeh.web.app

(expires Thu, 01 May 2025 06:04:54 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 95379efd94dd497aaa37c2d0354e6e2cafca5ec5

@julienrbrt
Copy link
Member

This feature is awesome! I'll take time to properly review after the break.

julienrbrt
julienrbrt previously approved these changes Apr 22, 2025
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! great feature!

@Pantani Pantani enabled auto-merge (squash) April 22, 2025 13:34
julienrbrt
julienrbrt previously approved these changes Apr 22, 2025
@julienrbrt julienrbrt added the backport/v28.x.y Backport to v28.x.y label Apr 24, 2025
@julienrbrt julienrbrt disabled auto-merge April 24, 2025 13:40
@julienrbrt julienrbrt merged commit af6b115 into main Apr 24, 2025
46 checks passed
@julienrbrt julienrbrt deleted the feat/include-config branch April 24, 2025 13:40
mergify bot pushed a commit that referenced this pull request Apr 24, 2025
* feat: add include feature to the chain config file

* improve logic

* fix wrong var

* add changlog

* fix lint

* fix lint and improve readbility

* fix lint and add comments

* fix comments

---------

Co-authored-by: julienrbrt <julien@rbrt.fr>
(cherry picked from commit af6b115)

# Conflicts:
#	ignite/config/chain/base/config.go
#	ignite/config/chain/parse.go
#	ignite/config/chain/parse_test.go
julienrbrt added a commit that referenced this pull request Apr 24, 2025
…4650)

* feat: add include feature to the chain config file (#4638)

* feat: add include feature to the chain config file

* improve logic

* fix wrong var

* add changlog

* fix lint

* fix lint and improve readbility

* fix lint and add comments

* fix comments

---------

Co-authored-by: julienrbrt <julien@rbrt.fr>
(cherry picked from commit af6b115)

# Conflicts:
#	ignite/config/chain/base/config.go
#	ignite/config/chain/parse.go
#	ignite/config/chain/parse_test.go

* fix conflicts

* go mod tidy

---------

Co-authored-by: Danilo Pantani <danpantani@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
@laciferin2024
Copy link

Great , amazing work. Its documented well: https://docs.ignite.com/references/config#include

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v28.x.y Backport to v28.x.y component:ci CI/CD workflow and automated jobs. component:configs component:docs Documentation additions or improvements. type:internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: extend config.yml for DX
3 participants