The rainbondfile source code defines the environment configuration file

rainbondfile introduction

rainbondfile is Rainbond’s code-based strategy for specifying the environment in which a service will run.It is an ordinary text file in yaml format, which needs to be placed in the root directory of the code, which is suitable for all service types built based on source code.Currently rainbondfile supports defining environment variables ports persistent storage startup commands four items.During the process of creating a component, Rainbond will automatically set the content defined in it to the service properties, which can be viewed in the Rainbond console. The complete use case is as follows:

  1. language: Java-maven
  2. buildpath: target/
  3. ports:
  4. - port: 8080
  5. protocol: http
  6. #If you need to open multiple ports, continue to add ports and specify protocol
  7. - port: 5000
  8. protocol: tcp
  9. envs:
  10. ENV_KEY1: ENV_VALUE1
  11. ENV_KEY2: ENV_VALUE2
  12. # Applicable to Dockerfile, NetCore source type
  13. cmd: java -jar xxxx.jar

rainbondfile role

The source code definition environment is the service management strategy recommended by Rainbond.Through the definition of rainbondfile, service attributes such as environment variables can be easily added in batches, and configurable attributes will be gradually added in subsequent versions.

Description of supported configuration items

  • language source type
  • ports service port list
  • envs List of service environment variables
  • Useful when the main directory of the buildpath service is not in the current directory, specify the address of the secondary directory
  • cmd specifies the service running mode, which is suitable for Dockerfile and NetCore source code types, and other languages specify the running mode through Procfile