1 | apeman-dply
|
2 | ==========
|
3 |
|
4 |
|
5 | This file is generated by ape-tmpl. Do not update manually.
|
6 | --->
|
7 |
|
8 |
|
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 |
|
30 |
|
31 |
|
32 |
|
33 | <a name="description"></a>
|
34 |
|
35 | Deply manager for apeman
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | <a name="overview"></a>
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | <a name="sections"></a>
|
50 |
|
51 |
|
52 |
|
53 | <a name="section-doc-guides-01-installation-md"></a>
|
54 | Installation
|
55 | -----
|
56 |
|
57 | Install 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 |
|
67 |
|
68 |
|
69 |
|
70 | <a name="section-doc-guides-02-usage-md"></a>
|
71 | Usage
|
72 | ---------
|
73 |
|
74 | 1. Prepare an Apemanfile.js at your project root.
|
75 | 2. Run the command via CLI.
|
76 |
|
77 | ***Apemanfile.js***
|
78 | ```javascript
|
79 | /** Example of Apemanfile.js */
|
80 |
|
81 | "use strict";
|
82 |
|
83 | module.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 |
|
102 | Then,
|
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 |
|
146 |
|
147 |
|
148 |
|
149 | <a name="section-doc-guides-03-programmatic-a-p-i-md"></a>
|
150 | Programmatic API
|
151 | ---
|
152 |
|
153 | apeman-dply also provide programmatic API.
|
154 |
|
155 | Firstly, install the module locally.
|
156 |
|
157 | ```bash
|
158 | $ npm install apeman-dply --save-dev
|
159 | ```
|
160 |
|
161 | Then,
|
162 |
|
163 | ```javascript
|
164 | "use strict";
|
165 |
|
166 | const apemanDply = require('apeman-dply');
|
167 |
|
168 | apemanDply({
|
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 |
|
193 |
|
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 | <a name="license"></a>
|
200 |
|
201 | License
|
202 | -------
|
203 | This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-dply/blob/master/LICENSE).
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 | <a name="links"></a>
|
210 |
|
211 | Links
|
212 | ------
|
213 |
|
214 | + [apeman](http://github.com/apeman-labo/apeman)
|
215 | + [apeman-cmd-labo](http://github.com/apeman-cmd-labo)
|
216 |
|
217 |
|