Skip to content

Commit af4c219

Browse files
committed
init
1 parent 5c1daf1 commit af4c219

4 files changed

Lines changed: 63 additions & 11 deletions

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
# node-docker
1+
# 备份Docker Swarm集群
2+
3+
## Features
4+
5+
- [Webpack 4](https://webpack.js.org/)
6+
- [Babel 7](https://babeljs.io/)
7+
- Supports server auto compile and restart
8+
9+
[![build status](http://gitlab.greatld.com:14444/qcc/app-backup-swarm/badges/master/build.svg)](http://gitlab.greatld.com:14444/qcc/app-backup-swarm/pipelines)
10+
[![Quality Gate](http://10.0.0.213:9000/api/badges/gate?key=qcc:app-backup-swarm)](http://10.0.0.213:9000/dashboard?id=qcc%3Aapp-backup-swarm)
11+
12+
## How to Install
13+
14+
```shell
15+
git clone http://gitlab.greatld.com:14444/qcc/app-backup-swarm.git
16+
cd micro-service-boilerplate
17+
npm install
18+
```
19+
20+
## How to Run and Build
21+
22+
### Run
23+
24+
```shell
25+
npm start
26+
```
27+
28+
### Build
29+
30+
```shell
31+
npm run build
32+
```
33+
34+
## Analyse webpack stats
35+
36+
We have integrated tools for analysing bundled file, after run `npm run build`, try to type the following command in your terminal.
37+
38+
```shell
39+
npm run analyse:server
40+
```
41+
42+
```shell
43+
npm run analyse
44+
```
45+
46+
Made with ♥ by Wu Jian Ping

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "node-docker",
2+
"name": "app-backup-swarm",
33
"version": "1.0.0",
4-
"description": "node-docker",
4+
"description": "备份docker swarm",
55
"main": "./build/index.js",
66
"dependencies": {
77
"axios": "^0.18.0",
@@ -38,7 +38,7 @@
3838
"webpack-sources": "^1.2.0"
3939
},
4040
"scripts": {
41-
"start": "babel-node app.js",
41+
"start": "babel-node src/app.js",
4242
"clean": "babel-node ./tools/run clean",
4343
"build": "cross-env NODE_ENV=production babel-node --max-old-space-size=7168 ./tools/run build",
4444
"test": "mocha -t 100000 \"src/**/*.test.js\" --require babel-register --require tests/setup.js",
@@ -48,4 +48,4 @@
4848
},
4949
"author": "",
5050
"license": "ISC"
51-
}
51+
}

src/app.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Created by Wu Jian Ping on - 2020/10/28.
3+
*/
4+
5+
import Docker from './libs/Docker'
6+
7+
const docker = new Docker()
8+
9+
const services = docker.service.ls()
10+
11+
console.log(services)
12+
13+

src/index.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)