# YML 中的环境变量 - 仅替换为操作系统的变量

**URL:** <https://meta.discourse.org/t/env-vars-in-yml-only-substituded-with-os-ones/280032>\
**Category:** Self-hosting\
**Created:** [2023 年9 月 25 日 15:53 UTC](https://meta.discourse.org/t/env-vars-in-yml-only-substituded-with-os-ones/280032 "2023-09-25T15:53:26Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)\
发布日期： [2023 年9 月 25 日 15:53 UTC](https://meta.discourse.org/t/env-vars-in-yml-only-substituded-with-os-ones/280032/1 "2023-09-25T15:53:26Z")

</div>

大家好。  
是否可以在_构建_时使用操作系统（bash）自己的参数/变量替换参数/变量？  
比如说……  
`host: /APPOW/log/${HOSTNAME}/discourse.test`  
我曾以为这会开箱即用，但对我来说不行。谢谢。

---

_[View the full topic](https://meta.discourse.org/t/env-vars-in-yml-only-substituded-with-os-ones/280032)._
