UNPKG

5.41 kBMarkdownView Raw
1apeman-dply
2==========
3
4<!---
5This file is generated by ape-tmpl. Do not update manually.
6--->
7
8<!-- Badge Start -->
9<a name="badges"></a>
10
11[![Build Status][bd_travis_shield_url]][bd_travis_url]
12[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
13[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
14[![npm Version][bd_npm_shield_url]][bd_npm_url]
15
16[bd_repo_url]: https://github.com/apeman-cmd-labo/apeman-dply
17[bd_travis_url]: http://travis-ci.org/apeman-cmd-labo/apeman-dply
18[bd_travis_shield_url]: http://img.shields.io/travis/apeman-cmd-labo/apeman-dply.svg?style=flat
19[bd_license_url]: https://github.com/apeman-cmd-labo/apeman-dply/blob/master/LICENSE
20[bd_codeclimate_url]: http://codeclimate.com/github/apeman-cmd-labo/apeman-dply
21[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-cmd-labo/apeman-dply.svg?style=flat
22[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-cmd-labo/apeman-dply.svg?style=flat
23[bd_gemnasium_url]: https://gemnasium.com/apeman-cmd-labo/apeman-dply
24[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-cmd-labo/apeman-dply.svg
25[bd_npm_url]: http://www.npmjs.org/package/apeman-dply
26[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-dply.svg?style=flat
27[bd_bower_badge_url]: https://img.shields.io/bower/v/apeman-dply.svg?style=flat
28
29<!-- Badge End -->
30
31
32<!-- Description Start -->
33<a name="description"></a>
34
35Deply manager for apeman
36
37<!-- Description End -->
38
39
40<!-- Overview Start -->
41<a name="overview"></a>
42
43
44
45<!-- Overview End -->
46
47
48<!-- Sections Start -->
49<a name="sections"></a>
50
51<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->
52
53<a name="section-doc-guides-01-installation-md"></a>
54Installation
55-----
56
57Install apeman-dply module via [npm][npm_url].
58```bash
59$ npm install apeman-dply -g
60```
61
62
63[npm_url]: https://www.npmjs.com/
64
65
66<!-- Section from "doc/guides/01.Installation.md.hbs" End -->
67
68<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->
69
70<a name="section-doc-guides-02-usage-md"></a>
71Usage
72---------
73
741. Prepare an Apemanfile.js at your project root.
752. Run the command via CLI.
76
77***Apemanfile.js***
78```javascript
79/** Example of Apemanfile.js */
80
81"use strict";
82
83module.exports = {
84 $cwd: __dirname,
85 $pkg: {/*...*/},
86 $proto: [/*...*/],
87 $tmpls: {/*...*/},
88 $tasks: {/*...*/},
89 $apps: {/*...*/},
90 $wtchs: {/*...*/},
91 $infrs: {
92 'my-node-01': './infra/node/Dockerfile' // Path infra docker path.
93 },
94 $dply: {
95 'my-deploy-01': [
96 require.resolve('./deploy/conf/node.conf.json')
97 ]
98 }
99};
100```
101
102Then,
103
104```bash
105$ apeman-dply
106```
107
108
109##### CLI Options
110
111```bash
112$ apeman-dply -h
113
114 Usage: apeman-dply [options] [name...]
115
116 Deploy project on docker.
117
118 Options:
119
120 -h, --help output usage information
121 -V, --version output the version number
122 -v, --verbose Show verbose logs
123 -f, --force Force to remove container.
124 -d, --delete Remove container.
125 -c, --configuration <configuration> Pathname of Apemanfile
126 -l, --list List available watches
127 -t, --tty Open terminal for dply
128 -r, --rerun Delete and execute deploying again.
129 -e, --exec <exec> Execute a command inside container.
130 -p, --print Print container log.
131 -P, --printon Print and follow container log.
132
133 Examples:
134
135 $ apeman-dply # Execute deploying defined in $dplys prop.
136 $ apeman-dply -l # List available deploy.
137 $ apeman-dply -t node # Open terminal for a deploy.
138 $ apeman-dply "node*" # Execute deploy which match pattern.
139 $ apeman-dply -d # Remove all deploy defined in $infra prop.
140
141
142```
143
144
145<!-- Section from "doc/guides/02.Usage.md.hbs" End -->
146
147<!-- Section from "doc/guides/03.Programmatic API.md.hbs" Start -->
148
149<a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
150Programmatic API
151---
152
153apeman-dply also provide programmatic API.
154
155Firstly, install the module locally.
156
157```bash
158$ npm install apeman-dply --save-dev
159```
160
161Then,
162
163```javascript
164"use strict";
165
166const apemanDply = require('apeman-dply');
167
168apemanDply({
169
170}, (err) =>{
171 /*...*/
172});
173```
174
175
176##### Programmatic Options
177
178| Key | Description | Default |
179| --- | ----------- | ------- |
180| verbose | Show verbose logs | |
181| force | Force to remove container. | |
182| delete | Remove container. | |
183| configuration | Pathname of Apemanfile | |
184| list | List available watches | |
185| tty | Open terminal for dply | |
186| rerun | Delete and execute deploying again. | |
187| exec | Execute a command inside container. | |
188| print | Print container log. | |
189| printon | Print and follow container log. | |
190
191
192<!-- Section from "doc/guides/03.Programmatic API.md.hbs" End -->
193
194
195<!-- Sections Start -->
196
197
198<!-- LICENSE Start -->
199<a name="license"></a>
200
201License
202-------
203This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-dply/blob/master/LICENSE).
204
205<!-- LICENSE End -->
206
207
208<!-- Links Start -->
209<a name="links"></a>
210
211Links
212------
213
214+ [apeman](http://github.com/apeman-labo/apeman)
215+ [apeman-cmd-labo](http://github.com/apeman-cmd-labo)
216
217<!-- Links End -->