YAML Syntax

# This is a comment 
# Everything is a key-value pair 

# string - You don't have to close it with quotes! 
# Unless you want to use special string characters 
# integers can be written like normal
app: user-authentication
port: 9000
version: 1.7 

#Objects - You can group k-v pairs by indenting them and enclosing it
microservice:
	app: user-authentication
	port: 9000
	version: 1.7

#Lists in YAML, by using the hypen '-'
# This will allow us to create mulitple objects, by just adding a hypen
microservice:
	- app: user-authentication
		port: 9000
		version: 1.7
	- app: shopping-cart
		port: 9001
		versions: 
		- 1.8
		- 1.9
		- 1.2

# Multiline string - using the pipe operator 
multilineString: |
	this is a multiline string
	hello my name is tahir 
	next line

# You can configure shell commands to run within the file! 
# Example:
command: 
	- sh
	- -c
	- |
		#!/user/bin/env bash -e
		http() {
			local path="${1}"
			set -- -XGET -s --fail
			#some more stuff here
			curl -k "$@" "http://localhost:5601${path}"
		}
		http: '/app/kibana'

# Can use environmental variables by using the dollar sign
command:
	- /bin/sh
	- ec
	- >-
		mysql -h 127.0.0.1 -u root -p$MYSQL_ROOT_PASSWORD -e 'SELECT 1' 

# Place holders can be used by using double squigly brackets
# Multiple components can be seperated by 3 dashes ---