You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`upload: cannot create ${dirname(destPath)} on ${name}: ${r.stderr.trim()||`exit ${r.exitCode}`}`,
238
+
ErrorCode.DEPLOY_FAILED,
239
+
`The deploy user must own the destination directory. Run once on the server as root:\n mkdir -p '${dirname(destPath)}' && chown ${conn.user}: '${dirname(destPath)}'`,
240
+
);
241
+
}));
237
242
238
243
consttasks=plan.hosts.map(hostState=>async()=>{
239
244
const{ name, conn }=hostState;
@@ -253,22 +258,28 @@ export async function uploadFiles(ctx: DeployContext): Promise<UploadRollbackPla
`upload: failed to transfer ${upload.src}to${name}: ${detail}`,
261
+
`upload: failed to transfer ${upload.src}→ ${destPath} on${name}: ${detail}`,
257
262
ErrorCode.DEPLOY_FAILED,
258
263
`Ensure ${conn.user} has write access to ${dirname(destPath)} on ${name}. Run once as root:\n mkdir -p '${dirname(destPath)}' && chown ${conn.user}: '${dirname(destPath)}'`,
Copy file name to clipboardExpand all lines: docs/app/configuration/upload/page.mdx
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,8 @@ services:
32
32
| `service` | `string \| string[]` | Service(s) this upload belongs to. When deploying with `--only`, only uploads matching a targeted service are transferred. Uploads without this field are always transferred. | No |
33
33
| `permissions` | `string` | File permissions applied after upload, in octal notation (e.g. `"640"`, `"755"`). | No |
34
34
| `owner` | `string` | File owner applied after upload, in `"user"` or `"user:group"` format (e.g. `"mosquitto"`, `"www-data:www-data"`). Requires the deploy user to have `sudo` or sufficient privileges. | No |
35
+
| `exclude` | `string[]` | Glob patterns or paths to skip during directory upload (e.g. `".git"`, `"*.md"`, `"node_modules"`). Ignored for single-file uploads. | No |
36
+
| `compress` | `boolean` | Compress the archive during transfer (default: `true`). Set to `false` for directories full of already-compressed files (JARs, ZIPs, images) to reduce CPU overhead without affecting transfer size. | No |
35
37
36
38
`dest`must start with `/`. If `src` is a directory, `dest` is used as the destination directory and the relative structure is preserved.
Some projects have no Docker services — they only transfer files to a server. Use `no_services: true` to declare this explicitly:
158
+
159
+
```yaml
160
+
# .dockflow/config.yml
161
+
project_name: my-project
162
+
no_services: true
163
+
164
+
upload:
165
+
- src: ./dist/
166
+
dest: /var/www/my-project/
167
+
```
168
+
169
+
With `no_services: true`:
170
+
- Docker build and compose deploy are skipped entirely
171
+
- Commands that require a running stack (`dockflow app logs`, `dockflow app status`, `rollback`, etc.) return a clear error instead of failing silently
172
+
- Pre/post-deploy hooks still run
173
+
174
+
<Callout type="warning">
175
+
Without `no_services: true`, a missing `docker-compose.yml` is treated as a configuration error and the deployment fails. Only set this flag when the project genuinely has no Docker services — not as a workaround for a misconfigured compose path.
176
+
</Callout>
177
+
153
178
## See also
154
179
155
180
- [Templates](/configuration/templates) — use `{{ current.env.xxx }}` inside transferred files via Nunjucks rendering
0 commit comments