Skip to content

Developer Environment Variables ​

In the application configuration lzc-manifest.yml, you can configure the environment for each service in services, as shown in the following example of configuring environment variables for bitnami/wordpress:5.8.2.

services:
  wordpress:
    image: bitnami/wordpress:5.8.2
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
      - DISABLE_FEATURE_ABC=yes

Runtime Environment Variable List ​

Each container will automatically inject the following environment variables in the runtime environment. Other variables need to be manually injected by developers.

Variable NameExample ValueDescription
LAZYCAT_APP_DEPLOY_UIDadminUser to whom the container belongs in multi-instance applications. If empty, it indicates single-instance deployment (introduced in lzcos-v1.2)
LAZYCAT_APP_DOMAINl4test.snyht3.heiyu.spaceDomain assigned to the application. Do not permanently store this value, as it may change after restart in subsequent versions
LAZYCAT_APP_IDtest.lzcos.l4ingressApplication's appid, equivalent to /lzcapp/pkg/manifest.yml:Package field
LAZYCAT_APP_SERVICE_NAMEappName of the service to which the current container belongs
LAZYCAT_BOX_DOMAINsnyht3.heiyu.spaceLCMD's main domain name. Do not permanently store this value, as it may change after restart in subsequent versions
LAZYCAT_BOX_NAMEsnyht3LCMD name

Deployment Environment Variable List ​

During the deployment configuration phase (when the system parses lzc-manifest.yml), you can use the following environment variable values. Use ${ENV_NAME} in lzc-manifest.yml.

For example:

services:
  iperf:
    image: registry.lazycat.cloud/snyh1010/some_nginx:2694e91b783def0b
    command: -my-domain ${LAZYCAT_APP_DOMAIN}
Variable NameExample ValueDescription
LAZYCAT_APP_DEPLOY_UIDadminUser to whom the container belongs in multi-instance applications. If empty, it indicates single-instance deployment (introduced in lzcos-v1.2)
LAZYCAT_APP_DEPLOY_IDxx.yy.zzInstance's own ID (introduced in lzcos-v1.3.8)
LAZYCAT_APP_DOMAINl4test.snyht3.heiyu.spaceDomain assigned to the application. Do not permanently store this value, as it may change after restart in subsequent versions (introduced in lzc-os-v1.2)
LAZYCAT_APP_IDtest.lzcos.l4ingressApplication's appid, equivalent to /lzcapp/pkg/manifest.yml:Package field
LAZYCAT_BOX_DOMAINsnyht3.heiyu.spaceLCMD's main domain name. Do not permanently store this value, as it may change after restart in subsequent versions
LAZYCAT_BOX_NAMEsnyht3LCMD name
LAZYCAT_AUTH_OIDC_CLIENT_IDtest.lzcos.l4ingressOAuth client id
LAZYCAT_AUTH_OIDC_CLIENT_SECRETa3deb9086885cbbc7OAuth secret randomly generated during installation phase. Changes every time the container restarts, so do not save it in the database
LAZYCAT_AUTH_OIDC_ISSUER_URIxxxOAuth issuer address
LAZYCAT_AUTH_OIDC_AUTH_URIxxxAUTH endpoint address
LAZYCAT_AUTH_OIDC_TOKEN_URIxxxToken endpoint address
LAZYCAT_AUTH_OIDC_USERINFO_URIxxxUserinfo endpoint address

ps: OIDC-related environment variables are only injected when application.oidc_redirect_path exists