shipfe 0.1.14 → 0.1.16

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.
Files changed (3) hide show
  1. package/README.md +53 -4
  2. package/bin/shipfe +0 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -98,12 +98,61 @@ 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
+ }
101
139
  ```
102
140
 
103
- In this example:
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`
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
146
+ ```
147
+
148
+ ### Deploy all sub-environments at once
149
+ ```bash
150
+ shipfe deploy --profile dev --all-sub
151
+ ```
152
+
153
+ This will deploy to all sub-environments (admin, shop, cu) in sequence.
154
+
155
+ Sub-environments inherit settings from the parent environment and can override `build_command`, `local_dist_path`, and `remote_deploy_path`.
107
156
 
108
157
  **Or use environment variable for all servers:**
109
158
  ```bash
package/bin/shipfe CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shipfe",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "description": "A deployment tool for web applications",
5
5
  "main": "index.js",
6
6
  "bin": {