You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/02/15 07:52:24 UTC

[GitHub] [incubator-apisix] qiujiayu commented on issue #1123: feature: Does apisix support distinguish configuration of different environments by environment variables ?

qiujiayu commented on issue #1123: feature: Does apisix support distinguish configuration of different environments by environment variables ?
URL: https://github.com/apache/incubator-apisix/issues/1123#issuecomment-586565298
 
 
   Use different file names to manage the configuration of different environments. The purpose is to avoid frequent modification of the same document. like this:
   
   ```
   local profile = os.getenv("APISIX_PROFILE")
   
   local local_conf_path
   if profile then
       local_conf_path = ngx.config.prefix() .. "conf/apisix-" .. profile .. ".yml"
   else
       local_conf_path = ngx.config.prefix() .. "conf/apisix.yml"
   end
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services