Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Latest commit

 

History

History
38 lines (31 loc) · 1.14 KB

substitutions.md

File metadata and controls

38 lines (31 loc) · 1.14 KB

substitutions section

Tip

Sub vars use a bash like syntax: ${VAR_NAME}

The substitutions section is where you define your substitution variables. These variables can be used throughout the config file for convenience.

IncludeFile

  • IncludeFile: <string>
  • Default: ${CFG_DIR}/secrets.yml

The IncludeFile key is used to import additional sub vars from a separate file. This is useful for keeping sensitive information out of the main config file (secrets). If this is defined and the file does not exist, the server will fail to run.

Tip

IncludeFile can be omitted if you do not have a secrets file.

Example

secrets.yml

server:
  IMPORTED SECRET: "This is from the secrets file!"

server.yml

substitutions:
  EXAMPLE: "World!"
  BASE_DIR: /opt/zomi/server
  CFG_DIR: ${BASE_DIR}/conf
  LOG_DIR: ${BASE_DIR}/logs
  
  # - Import additional sub vars from this file
  IncludeFile: /path/to/secrets.yml

Example of a sub var: "Hello, ${EXAMPLE}"
Example of a secret: my secret = ${IMPORTED SECRET}