WebDeploy(1)

πŸ“¦
version 1.0 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

WebDeploy πŸ’– β€” yep, this is the WebDeploy(1) manual page, and it does exactly what it says on the tin: deploy files via FTP. Buckle up bestie, we're shipping your local files to a server and it's gonna be adorable. πŸ¦‹βœ¨


✨ NAME ✨

webdeploy β€” deploy local files to an ftp server. That's the whole gig. πŸ’…

🌸 SYNOPSIS 🌸

webdeploy [options]

Options:

  • --exclude β€” the name of the exclude file. (default: '.exclude')
  • --globalexclude β€” the name of the global exclude file. (default: '.globalexclude')
  • --server β€” the host name or address, no cap.
  • --port β€” the port number for the connection. (default: 21)
  • --server-root β€” the root folder on the server where files should be uploaded.
  • --user β€” the user name for login. (defaults to current user)
  • --no-ftps, --no-tls β€” disable Transport Layer Security (TLS) so you use plain FTP instead of FTPS.
  • --dry-run β€” print the list of local files that will be checked for upload, then exit without uploading. πŸ‘€
  • --ftp-dry-run β€” log in to the FTP server to check which local files are new or out of date, then exit without uploading.
  • --config β€” the configuration file. (default: '.webdeploy_conf')
  • --help β€” brief help message. πŸ™

πŸ’… OPTIONS πŸ’…

--exclude

Name your exclude file here. Before WebDeploy scans a directory for files to upload, it reads the exclude file first. Any directories listed in there will not be scanned, and any other file in that directory that's listed will not be uploaded. This happens in every directory that gets scanned, okay?

An exclude file is unique to its directory β€” like, each folder gets its own β€” but all of them have to share the same name. By default WebDeploy looks for a file called '.exclude'. If that file isn't there, nothing gets excluded, simple as that. Peep the exclude files section below for the deets. πŸ“

--globalexclude

Basically the same vibe as the normal exclude file, but with a glow-up: this one is only looked for in the root directory (the place where you ran webdeploy), and every exclusion inside it applies to every single directory that gets scanned. See the exclude files section below. 🌍

--server-root

This is the root directory on the server that gets used for upload. Any files sitting in your root working directory when you run webdeploy get uploaded into this folder. If you set this one, make sure you give it a directory with no trailing slash β€” fr fr, that part matters.

So like, if you want your files to land in /var/www/ on the server, you use the option --server-root /var/www. 🎯

--dry-run

Prints the list of local files that will be checked for upload, then dips out without uploading anything. This is so useful for checking that you set up your exclude files correctly β€” it's giving free trial, no commitment. 🧚

--ftp-dry-run

Logs in to the FTP server to check which local files are new or out of date on the server, then exits without uploading. Perfect for seeing which files you've updated or created since the last deploy. It also shows you the directory on the server that will be used as the root directory for upload β€” and that root directory can be set with --server-root. πŸ‘‘

Heads up: every option can be specified using any unique abbreviation. So --conf is the same as --config, but --ser is invalid because it's the start of both --server and --server-root. Ambiguity is not the vibe. πŸ’€

🌈 DESCRIPTION 🌈

WebDeploy uploads files from the current local directory to an FTP server. Files only get uploaded if the local version is newer than the server version β€” no pointless re-uploads here. And you can exclude files using the 'exclude' and 'globalexclue' options. ✨

πŸŽ€ CONFIG FILES πŸŽ€

By default, WebDeploy looks for a file called .webdeploy_conf in the current directory. If it finds it, it loads the options from that file. You can point it at a different config file from the command line with the --config option. πŸ—‚οΈ

Every option available on the command line (except the --config option) can be specified in a config file.

A config file has to consist only of:

  • blank lines
  • comment lines (starting with a '#' symbol)
  • option lines, which are key-value pairs

Option lines take the form 'KEY = VALUE'. Everything after the first equals sign (minus leading and trailing blanks) counts as part of the value. So a value can totally contain an equals sign with no special escaping needed. πŸ’–

Note: no warnings get issued if an option is specified on both the command line and the config file. When that happens, the config file has priority. Config file ate and left no crumbs.
Also note: option names (keys) in configuration files cannot be abbreviated like command line options. So don't try it. πŸ™ˆ

Here's an example configuration file:

# Server connection details
server = ftp.example.com
port   = 1234

# Login user name
user = daniel

# Server's public html folder
server-root = var/www

πŸ¦‹ EXCLUDE FILES πŸ¦‹

An exclude file consists only of:

  • blank lines
  • comment lines (starting with a '#' symbol)
  • patterns to match files to exclude

To exclude a file called 'foo', you could use a config file like this:

# Exclude the file 'foo'
foo

To exclude all files that end with .foo, use a wildcard pattern like this:

# Exclude all files with the foo extension.
*.foo

You can also match against a class of characters:

# Exclude a.foo and b.foo but not c.foo
[ab].foo

To exclude a directory, just name the directory with no leading or trailing slashes:

# Exclude the 'src' directory
src
Gotcha: a directory could match a pattern you only intended to apply to regular files. Watch out for that one. 😭

⭐ EXAMPLES ⭐

Upload files via a plain ftp connection to ftp.example.com, port 1234, as user 'user@example.com':

webdeploy --server=ftp.example.com --user=user@example.com --port=1234 --no-tls

See which files need uploading (the ones that changed since the last upload) using the settings in 'my_config.conf':

webdeploy --config my_config.conf --ftp-dry-run

See what files will be uploaded (maybe to test a .exclude rule):

webdeploy --dry-run

πŸ’€ LIMITATIONS πŸ’€

WebDeploy currently doesn't support SFTP (FTP via SSH). Not yet, anyway. πŸ˜”

WebDeploy can only be used for uploading content in the current directory. It is not possible to upload content from a different directory without first changing to that directory. So cd first, bestie. πŸšΆβ€β™€οΈ

πŸ‘‘ AUTHOR πŸ‘‘

WebDeploy was written by Daniel Bailey. Iconic behaviour, honestly.

Contact: info-d@nielbailey.com

πŸ™ REPORTING BUGS πŸ™

Please report bugs via email directly to Daniel Bailey using the email address: webdeploy-bug-d@nielbailey.com

Copyright 2015 Daniel Bailey

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.


and that's the whole page, bestie 🫢 β€” this was Version 1.0, dated 2022-06-14. now go deploy something cute πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from