0

一些 PaaS 提供商有一个APPLICATION_UUID环境变量,这显然是唯一的(至少在他们的平台上)。

DotCloud 有类似的东西吗?我在environment.json中没有找到类似的东西

4

2 回答 2

1

There isn't a UUID, but if you are trying to tell different instances from each other, you can use the dotcloud configuration values from the environment.json file:

DOTCLOUD_PROJECT : which is the name you have given the dotcloud application DOTCLOUD_SERVICE_NAME : which is the name you give each service (typically www, or data, etc) DOTCLOUD_SERVICE_ID : the instance number of a particular instance, starting at 0

If you concatenate the 3, it would create a unique identifier across all of your dotcloud applications, services, and instances.

于 2012-10-22T15:41:23.033 回答
0

没有这样的东西暴露在外面。你需要它做什么,也许我可以建议一个替代方案?

于 2012-06-08T14:32:21.027 回答