跳转到主要内容

Difio dotCloud / Python应用程序注册代理

项目描述

这是为DotCloud上的Python应用程序预先配置的Difio注册代理。

它编译本地安装的Python包列表并将其发送到http://www.dif.io

在您的dotCloud应用程序上安装

http://www.dif.io创建账户

在dotCloud上创建您的Python应用程序

配置您的Difio用户ID。您可以从https://difio-otb.rhcloud.com/profiles/mine/获取。

dotcloud var set <app name> DIFIO_USER_ID=UserID

为该应用程序生成一个唯一的标识符并将其保存为环境变量。

dotcloud var set <app name> DIFIO_UUID=`uuidgen`

在您的requirements.txt文件中添加依赖项

echo difio-dotcloud-python >> requirements.txt

在您的postinstall钩子中启用注册脚本。注意:如果您使用的是“approot”,您的postinstall脚本应在您的dotcloud.yml的“approot”指令指向的目录中。有关postinstall的更多信息,请参阅http://docs.dotcloud.com/guides/postinstall/

如果尚未存在名为postinstall的文件,请创建它并添加以下内容

#!/bin/sh
/home/dotcloud/env/bin/difio-dotcloud-python

使postinstall可执行

chmod a+x postinstall

提交您的更改(如果您使用git)

git add .
git commit -m "enable Difio registration"

然后将您的应用程序推送到 dotCloud

dotcloud push <app name>

如果一切顺利,您应该会看到类似以下内容

19:55:10 [www.0] Running postinstall script...
19:55:13 [www.0] response:200
19:55:13 [www.0] Difio: Success, registered/updated application with uuid ac5a3741-a564-4e59-aad2-3f51ea860521

就这样,现在您可以在 http://www.dif.io 检查您的应用程序统计信息

项目详情


下载文件

下载适合您平台文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源代码分发

difio-dotcloud-python-2.6.1.tar.gz (3.5 kB 查看哈希值)

上传时间 源代码

由...支持