dirs.yaml


Overview

This file serves as a configuration snippet in YAML format that defines directory paths used within the application environment. It provides key directory variables related to the "block-keeper" module, specifying locations for main files, data storage, and logs. These directories are defined relative to other environment variables (ROOT_DIR and MNT_DATA), allowing for flexible deployment and environment configuration.


Configuration Variables

The file declares three variables:

Variable

Description

Value Source

BK_DIR

The base directory path for the "block-keeper" module.

Derived from ROOT_DIR

BK_DATA_DIR

Directory path for storing "block-keeper" data files.

Derived from MNT_DATA

BK_LOGS_DIR

Directory path for storing logs generated by "block-keeper".

Derived from MNT_DATA

Variable Details


Implementation Details


Interaction with Other System Components

The environment variables ROOT_DIR and MNT_DATA must be defined elsewhere in the system or environment settings to resolve these paths correctly.


Visual Diagram

flowchart TD
ROOT_DIR["ROOT_DIR"]
MNT_DATA["MNT_DATA"]
BK_DIR["BK_DIR\n(block-keeper base path)"]
BK_DATA_DIR["BK_DATA_DIR\n(block-keeper data)"]
BK_LOGS_DIR["BK_LOGS_DIR\n(block-keeper logs)"]
ROOT_DIR --> BK_DIR
MNT_DATA --> BK_DATA_DIR
MNT_DATA --> BK_LOGS_DIR

Usage Examples

Assuming the environment variables are set as follows:

export ROOT_DIR="/opt/app"
export MNT_DATA="/mnt/data"

After processing dirs.yaml, the resolved variables would be:

BK_DIR=/opt/app/block-keeper
BK_DATA_DIR=/mnt/data/block-keeper
BK_LOGS_DIR=/mnt/data/logs-block-keeper

These paths can then be used in scripts or applications that require file access to the block-keeper module’s directories.


For more details on environment variable usage and templating, refer to the Environment Variables Configuration and YAML Configuration Files.