Yaml 环境变量是否可以在cloud foundry清单中保存数组值?
我正在尝试将一个应用程序推送到CloudFoundry,并通过环境变量传递一个数组值。 但我收到yaml:unmarshal错误: 第7行:无法解组!!将seq转换为字符串 失败 manifest.yml:Yaml 环境变量是否可以在cloud foundry清单中保存数组值?,yaml,manifest,cloud-foundry,pcf,Yaml,Manifest,Cloud Foundry,Pcf,我正在尝试将一个应用程序推送到CloudFoundry,并通过环境变量传递一个数组值。 但我收到yaml:unmarshal错误: 第7行:无法解组!!将seq转换为字符串 失败 manifest.yml: --- applications: - name: my-app1 # A default name for Cloud Foundry to give your app memory: 128M # The amount of RAM required for
---
applications:
- name: my-app1 # A default name for Cloud Foundry to give your app
memory: 128M # The amount of RAM required for each instance
disk_quota: 256M # How much disk space the application needs
no-route: true
health-check-type: none
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
env:
countries:
- america
- australia
- japan
- nertherland
请注意:我通过在线验证器验证了我的yaml,它看起来不错。环境变量是一个操作系统概念,会传递到您的应用程序中。它们一定是弦 可以使用base64编码作为env var值对任意JSON、YAML或二进制数据进行编码
在您的应用程序中,您可以将base64解码为原始字符串(比如JSON字符串),然后将其解析为您想要的数据结构。在您的应用程序中,环境变量是一个操作系统概念,并传递到您的应用程序中。它们一定是弦 可以使用base64编码作为env var值对任意JSON、YAML或二进制数据进行编码 在您的应用程序中,您可以将base64解码为原始字符串(比如JSON字符串),然后将其解析为您希望在案例中使用字符串数组的数据结构