I am new to YAML and I would like to understand the following piece of a .yaml file:
version: "3.7"
services:
influxdb:
image: influxdb:alpine
environment:
INFLUXDB_DB: ft_services
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
volumes:
- datainfluxdb:/var/lib/influxdb
deploy:
restart_policy:
condition: on-failure
As far as I know, there are 3 types of data that can be used in a .yaml file: scalars, sequences and mappings. For example, version: "3.7" is a scalar. But I am not sure what the following are:
volumes:
- datainfluxdb:/var/lib/influxdb
environment:
INFLUXDB_DB: ft_services
INFLUXDB_ADMIN_USER: admin
INFLUXDB_ADMIN_PASSWORD: admin
I don't really understand what type of data are these and how do they work, can someone give me a hint?