cloud/cloudtool

此包已被放弃,不再维护。未建议替代包。

动态生成 cloud-config.yml 及其他配置文件

v1.1.1 2018-05-30 13:40 UTC

This package is auto-updated.

Last update: 2020-02-05 23:24:22 UTC


README

PHP 库,用于生成配置文件。

安装

sudo composer global require cloud/cloudtool

配置管理

动态从模板创建配置文件。

cloudtool 将搜索 *.ctt-文件(云工具模板)并解释它们。

{template target="/etc/apache/sites-enabled/001_vhost.conf" owner="root" group="root" mode="0755"}
{template onupdate="service apache2 restart"}
{env name="CLOUD_CONFIG_URL" > configUrl}

{fetch url=configUrl enc="JSON" > config}


{for host in config.hosts}
    <VirtualHost *:80>
        ServerName {= host.name}
        DocumentRoot {= host.docRoot}
    </VirtualHost>
{/for}