shipfe 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -4
- package/bin/shipfe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,12 +98,54 @@ Each server can have its own authentication method. Shipfe tries authentication
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
### Sub-environments
|
|
103
|
+
|
|
104
|
+
For deploying multiple applications or different configurations to the same server, use sub-environments:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"environments": {
|
|
109
|
+
"dev": {
|
|
110
|
+
"build_command": "npm run build",
|
|
111
|
+
"local_dist_path": "./dist",
|
|
112
|
+
"servers": [
|
|
113
|
+
{
|
|
114
|
+
"host": "dev.example.com",
|
|
115
|
+
"port": 22,
|
|
116
|
+
"username": "deploy",
|
|
117
|
+
"remote_deploy_path": "/var/www/dev",
|
|
118
|
+
"delete_old": false
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"remote_tmp": "/tmp",
|
|
122
|
+
"sub_environments": {
|
|
123
|
+
"admin": {
|
|
124
|
+
"build_command": "npm run build:admin",
|
|
125
|
+
"remote_deploy_path": "/var/www/dev/admin"
|
|
126
|
+
},
|
|
127
|
+
"shop": {
|
|
128
|
+
"build_command": "npm run build:shop",
|
|
129
|
+
"remote_deploy_path": "/var/www/dev/shop"
|
|
130
|
+
},
|
|
131
|
+
"cu": {
|
|
132
|
+
"build_command": "npm run build:cu",
|
|
133
|
+
"remote_deploy_path": "/var/www/dev/cu"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Deploy to sub-environments:
|
|
142
|
+
```bash
|
|
143
|
+
shipfe deploy --profile dev-admin
|
|
144
|
+
shipfe deploy --profile dev-shop
|
|
145
|
+
shipfe deploy --profile dev-cu
|
|
101
146
|
```
|
|
102
147
|
|
|
103
|
-
|
|
104
|
-
- `web1.prod.com` uses password authentication
|
|
105
|
-
- `web2.prod.com` uses SSH key file `/home/user/.ssh/web2_key`
|
|
106
|
-
- `web3.prod.com` uses SSH key file `/home/user/.ssh/web3_key`
|
|
148
|
+
Sub-environments inherit settings from the parent environment and can override `build_command`, `local_dist_path`, and `remote_deploy_path`.
|
|
107
149
|
|
|
108
150
|
**Or use environment variable for all servers:**
|
|
109
151
|
```bash
|
package/bin/shipfe
CHANGED
|
Binary file
|