<p>Repository: <a href="https://github.com/gulien/orbit" rel="nofollow">https://github.com/gulien/orbit</a></p>
<hr/>
<p>The idea behind this tool is helping me generating some configuration files from templates.
As Orbit uses the Go package text/template under the hood as a template engine, it provides a nice amount of logic.</p>
<p>Let's say you have a template called <em>docker-compose.blueprint.ym</em> and data provided by a YAML file called <em>project.yml</em> and a .env file called <em>.env</em>.</p>
<p>You may define a task in a <em>orbit.yml</em> file:</p>
<pre><code>tasks:
- use: up
- short: Start my docker-compose stack
- run:
- orbit generate -f docker-compose.blueprint.yml -o docker-compose.yml -p "Project,project.yml;Env,.env"
- docker-compose -f docker-compose.yml up -d
</code></pre>
<p>And then running <code>orbit run up</code>: it will create your <em>docker-compose.yml</em> file and then starts your Docker stack.</p>
<p>Of course, this is just a simple example.
Orbit is able to handle many data sources for your templates (YAML, TOML, JSON, .env, raw data) and your orbit.yml file could also be a template itself!</p>
<p>Hope you like it :)</p>
Yet another task runner written in go: third version of Orbit has been released
agolangf · · 407 次点击这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传