https://github.com/charleslxh/grunt-dep
A grunt task plugin to deploy application
https://github.com/charleslxh/grunt-dep
deploy grunt grunt-plugins grunt-task nodejs ssh
Last synced: 5 months ago
JSON representation
A grunt task plugin to deploy application
- Host: GitHub
- URL: https://github.com/charleslxh/grunt-dep
- Owner: charleslxh
- License: mit
- Created: 2018-04-02T06:42:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-02T09:17:26.000Z (over 8 years ago)
- Last Synced: 2025-10-17T13:50:15.887Z (9 months ago)
- Topics: deploy, grunt, grunt-plugins, grunt-task, nodejs, ssh
- Language: JavaScript
- Homepage:
- Size: 65.4 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# What this?
A grunt task plugin to deploy application
# How to install
```bash
$ npm install grunt-dep --save-dev
```
# Configuration
see [node-dep configurations](https://github.com/charleslxh/node-dep).
# Example
task configuration:
```js
{
"options": {
"tasks": [
{
"name": "list all files in /var/www",
"command": "ls -la",
"priority": 0,
"stages": ["prod", "test"],
"workDir": "/var/www"
}
,
{
"name": "show the absolute path of application release path",
"command": "pwd",
"priority": 0,
"stages": ["prod", "test"]
}
],
"proxy": {
"host": "192.168.51.222",
"port": 22,
"username": "proxy_user_name",
"privateKey": fs.readFileSync(path.resolve(os.homedir(), ".ssh/id_rsa"))
}
},
"test": {
"options": {
"servers": [
{
"useProxy: false",
"stage": "test",
"releasePath": "/var/www/app",
"connectOptions": {
"name": "s1",
"host": "192.168.51.223",
"port": 22,
"username": "user",
"password": "123456"
}
}
]
}
},
"prod": {
"options": {
"servers": [
{
"name": "s1",
"useProxy: true",
"stage": "prod",
"releasePath": "/var/www/app",
"connectOptions": {
"host": "192.168.51.223",
"port": 22,
"username": "user",
"password": "123456"
}
}
,
{
"name": "s1",
"useProxy: true",
"stage": "prod",
"releasePath": "/var/www/app",
"connectOptions": {
"host": "192.168.51.223",
"port": 22,
"username": "user",
"password": "123456"
}
}
]
}
}
}
```
The result:
