UNPKG

7.44 kBMarkdownView Raw
1
2##aics
3
4A code manager & meteor project deploy command line tool.
5
6## Commanders
7
8```
9
10 deploy [options] <project> <key> 一键部署应用到服务器
11 setup 初始化私有服务器环境及依赖软件
12 push 部署项目到私有服务器
13 logs [options] 打印服务器日志
14 mongo 连接远程数据库
15 adduser 登录 aics CLI
16 whoami 显示 aics 登录用户信息
17 init [options] 生成aics配置文件
18 add [name] 添加 aics 代码包 代码包地址: http://code.fami2u.com/
19 update [options] 更新项目或代码包依赖
20 publish [options] 发布aics项目或组件
21 addfile [options] 添加文件到组件
22 lsfile [options] 显示指定代码包中的文件
23
24```
25
26- ### `aics -v`
27
28```
29Usage: aics -v
30 显示当前 aics 版本号
31
32```
33
34- ### `aics --help`
35
36```
37Usage: aics --help
38 显示 aics 所有的命令行
39
40```
41
42- ### `aics deploy`
43
44```
45Usage: deploy [options] <project> <key>
46Deployment this project to fami2x.com microhost
47
48 Options:
49 -h, --help output usage information
50 -m, --mobile-settings <mobile-settings.json> Set mobile-settings from json file
51 -s, --server-only server only
52 -e, --env <env.json> Set environment variables from json file
53 -d, --debug debug mode
54
55 Examples:
56 $ aics deploy appName # Deployment to http://appName.aics.cn
57 $ aics deploy appName --env env.json
58```
59
60- ### `aics setup`
61
62```
63 Usage: setup [options]
64 Configuration runtime environments on private server
65
66 Options:
67 -h, --help output usage information
68
69 Examples:
70 $ aics setup # configuration your server
71
72```
73
74- ### `aics push`
75
76```
77 Usage: push [options]
78 Deployment a project to private server
79
80 Options:
81 -h, --help output usage information
82 -m, --mobile-settings <mobile-settings.json> Set mobile-settings from json file
83 -s, --server-only server only
84 -d, --debug debug mode
85
86 Examples:
87 $ aics push # config package.js
88 $ aics push
89```
90
91- ### `aics logs`
92
93```
94 Usage: logs [options]
95 Print logs on server
96
97 Options:
98 -h, --help output usage information
99 -l, --lines <lines> output the last N lines, instead of the last 50 by default
100
101 Examples:
102 $ aics logs
103 $ aics logs -t 100
104```
105
106- ### `aics mongo`
107
108```
109 Usage: mongo [options]
110 Connection to a remote mongo database
111
112 Options:
113 -h, --help output usage information
114
115 Examples:
116 $ aics mongo
117```
118
119- ### `aics adduser`
120
121```
122 Usage: adduser [options]
123 登录aics cli
124
125 Options:
126 -h, --help output usage information
127
128 Examples:
129 $ aics adduser
130```
131
132- ### `aics whoami`
133
134```
135 Usage: whoami [options]
136 显示 aics 登录用户信息
137
138 Options:
139 -h, --help output usage information
140
141 Examples:
142 $ aics whoami
143```
144
145- ### `aics init`
146
147```
148 Usage: init [options]
149 生成aics配置文件
150
151 Options:
152 -h, --help output usage information
153 -p, --project <name> generate aics project conf
154 -e, --example <name> generate project from example project conf
155
156 Examples:
157 $ aics init -p [name] # 创建新的aics项目
158 $ aics init -e [name] # 根据 name 生成一个项目
159 $ aics init [name] # 生成一个 名为 name 代码包项目
160```
161
162- ### `aics add`
163
164```
165 Usage: add [options] [packagename]
166 添加名为 packagename 的 aics 代码包 代码包地址: http://code.fami2u.com/
167
168 Options:
169 -h, --help output usage information
170
171 Examples:
172 $ aics add fami:readme
173```
174
175 - ### `aics update`
176
177```
178 Usage: update [options]
179
180 更新项目或代码包依赖
181
182 Options:
183 -h, --help output usage information
184 -a, --all <path> update all packages in .aics/packages.json
185
186 Examples:
187 $ aics update -a # 更新项目依赖的代码包的版本
188 $ aics update [name] # 更新名为 [name] 的代码包依赖的代码包的版本
189```
190
191- ### `aics publish`
192
193```
194 Usage: publish [options]
195 发布aics项目或组件
196
197 Options:
198 -h, --help output usage information
199 -p, --project <name> 发布解决方案(项目)
200
201 Examples:
202 $ aics publish -p [name] # 发布名为 [name] 的 aics 项目
203 $ aics publish [name] # 发布名为 [name] 的 aics 代码包
204```
205
206 - ### `aics addfile`
207
208```
209 Usage: addfile [options]
210 添加文件到组件
211
212 Options:
213 -h, --help output usage information
214 -f, --file <path> 文件名或目录
215 -t, --target <name> 添加到的组件名称
216
217 Examples:
218 $ aics addfile -f README.md -t depot # 添加文件README.md 到 depot 组件包
219```
220
221 - ### `aics lsfile`
222
223```
224 Usage: lsfile [options]
225 显示指定代码包中的文件
226
227 Options:
228 -h, --help output usage information
229 -t, --target <name> 组件名称
230
231 Examples:
232 $ aics lsfile -t depot # 显示 depot 代码包中的文件
233```
234
235## 配置文件示例
236
237- aics 部署项目到私有服务器
238
239```
240
241 "server": {
242 "host": "182.92.11.131",
243 "username": "root",
244 "//password": "password",
245 "//":" or pem file (ssh based authentication)",
246 "//": "WARNING: Keys protected by a passphrase are not supported",
247 "pem": "~/.ssh/id_rsa",
248 "//":" Also, for non-standard ssh port use this",
249 "sshOptions": { "port" : 22 },
250 "//":" server specific environment variables",
251 "env": {}
252 },
253 "setup": {
254 "//": "Install MongoDB on the server. Does not destroy the local MongoDB on future setups",
255 "mongo": true,
256 "//": "Application server path . must in /usr /opt /home /alidata directory.",
257 "path": "/usr/local/meteorup"
258 },
259 "deploy": {
260 "//": "Application name (no spaces).",
261 "appName": "best",
262 "//": "Configure environment",
263 "//": "ROOT_URL must be set to your correct domain (https or http)",
264 "env": {
265 "YJENV": "test", // customize environment
266 "MONGO_URL": "mongodb://127.0.0.1:27017/best",
267 "PORT": 8181,
268 "ROOT_URL": "http://182.92.11.131:8181"
269 }
270 }
271
272```
273
274- aics 初始化项目配置文件
275
276```
277├── ROOT_PATH/
278| ├── .aics/
279| | └── project.json
280| | └── packages.json
281| ├── ...
282```
283
284```
285project.json
286
287{
288 "name": "",
289 "stack": "",
290 "type": "project",
291 "version": "0.0.1",
292 "summary": "",
293 "git": "",
294 "documentation": "README.md",
295 "dependencies": {},
296 "packages": {},
297 "npm": {}
298}
299```
300
301- aics 初始化 代码包配置文件
302
303```
304├── ROOT_PATH/
305| ├── .aics/
306| | └── [x].depot.json
307| | └── packages.json
308| ├── ...
309```
310
311```
312[x].depot.json
313
314{
315 "stack": "",
316 "name": "",
317 "version": "0.0.1",
318 "summary": "",
319 "git": "",
320 "documentation": "README.md",
321 "dependencies": {},
322 "packages": [],
323 "npm": {},
324 "files": []
325 }
326```
327
328## FeedBack
329使用过程中如果遇到问题 , 请提交 [ISSUE](https://github.com/fami2u/aics-docs/issues)
330
331