Try using >
this solution works pretty well if you need to have a json in your env variables. There are many ways to have a multiline strings in YAML.
version: '2'
services:
catalog-api-autoscaling:
image: company.it/project/catalog-api-autoscaling:latest
container_name: api-autoscaling
ports:
- "8083:8083"
environment:
CONFIG_ABC: >
{
"database": {
"catalog": {
"credentials": {
"username": "scott",
"password": "tiger",
"datbase": "catalog",
"host": "gn.dmfkd.lan"
}
}
}
}
CONFIG_DEF: >
{
"urlRegex": "/.*",
"script": {
"scriptPath": "example-python-app.py"
},
"runtime": "python27",
"threadsafe": true,
}