YAML

108 阅读1分钟

Basic syntax

  1. key-value

value can be with quotes (", ' or no qootes)

  1. comment starts with #

  2. objects (with indentations)

  3. list two different identation mode(same with parents)

microservices:
  - app: user-authentication
    port: 9000
    versions: 
    - 1.7
    - 2.0
    app_list: [1, 2]
    
    
  1. multilineString
command:
  - sh 
  - -c 
  - |
    #!/usr/bin/env bash -e
    http() {
      curl -k http:/localhost
    }

single line

multiple config in one yaml file

placeholder using {{}} env variable to use $VARIALBENAME