# 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:** 6

<div class="post-metadata">

作者： ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
发布日期： [2023 年9 月 25 日 18:09 UTC](https://meta.discourse.org/t/env-vars-in-yml-only-substituded-with-os-ones/280032/6 "2023-09-25T18:09:09Z")

</div>

我不认为启动器会替换那些环境变量。可以构建一个镜像，然后使用不同的域名多次启动同一个镜像。你可以运行

```
./launcher start-cmd app

```

来查看启动需要哪些环境变量。

要在一个尚未引导的宿主机上执行此操作，你需要迁移数据库并预编译资源。

---

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