Download the PHP package mentosmenno2/sftp-deploy without Composer

On this page you can find all versions of the php package mentosmenno2/sftp-deploy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sftp-deploy

GitHub Actions status

Mentosmenno2 SFTP Deploy

Build and deploy PHP applications via (S)FTP, with a simple command!

Requirements

Installation

Install this dependency with composer as dev-dependency.

Add the commands to the Composer scripts by adding this in the composer.json file.

Configuration

Use the init command to generate a configuration file. See the Commands section below.

Open the generated sftp-deploy.config.json file, and edit the properties following the specification below.

Configuration file properties

Property Type Default Description
__builds_directory__ string "deployments" The path where the the build will be created. Relative to your project directory.
builds_use_subdirectory boolean true Will make a separate subdirectory inside the builds_directory for your build.
builds_keep_revisions integer 5 Revisions of builds to keep when cleaning up builds.
__run_before__ [] string [] Commands to run before cloning your project from git
__repo_url__ string / null null Repository url to use for cloning your project from git.
repo_clone_directory string "." Path to clone the repo in. Relative to the builds_directory (with subdirectory if enabled).
__repo_checkout__ string "master" Default branch or tag to checkout when cloning the repo.
__run_after__ [] string [] Commands to run after cloning your project from git.
__deploy_directory__ string "." Directory to upload to (S)FTP. Relative to the builds_directory (with subdirectory if enabled).
__sftp_adapter__ string "sftp" Options: sftp, ftp. Adapter to choose for deploying.
__sftp_host__ string "example.com" (S)FTP host.
__sftp_port__ integer 22 (S)FTP port. SFTP usually uses 22. FPT usually uses 21.
__sftp_username__ string "username" (S)FTP username.
__sftp_password__ string "password" (S)FTP password.
__sftp_root__ string "/path/to/root" Path where files from deploy_directory should be placed. Absolute path from (S)FTP root.
__sftp_passive__ boolean true Use a passive connection. Only works when ftp is selected as sftp_adapter.
__sftp_ssl__ boolean true Use a SSL connection. Only works when ftp is selected as sftp_adapter.
__sftp_ignore_passive_address__ boolean false Don't use passive address. Useful when connection is blocked by firewall. Only works when ftp is selected as sftp_adapter.
__sftp_private_key_file__ string / null null Path to private key file. Absolute path. Only works when sftp is selected as sftp_adapter.
__sftp_private_key_password__ string / null null Private key password. Only works when sftp is selected as sftp_adapter.
sftp_directory_permission integer 0755 Set directory permission of sftp_root.

You can also use a custom configuration file. To do so, you can specify your custom configuration file, using the config operand. If you do so, you should also change the current deploy command (see installation section), or create a new one.

Commands

All commands can be run in the following way:

Init

Generate a configuration file. This file will be called sftp-deploy.config.json.

Build

Build the application.

Arguments

Argument Required Default Description
checkout No master The branch or tag you would like to checkout with git. Overwrites repo_checkout configuration parameter.

Deploy

Build and deploy the application to a (S)FTP server.

Does these actions:

  • First builds your app with the build command.
  • Then deploys that build to the (S)FTP server.
  • Finally cleans up old builds with the cleanup command.

Arguments

Argument Required Default Description
checkout No master The branch or tag you would like to checkout with git. Overwrites repo_checkout configuration parameter.

Cleanup

Cleanup old builds.

Notes:

  • This only works when builds_use_subdirectory is enabled in the configuration.
  • Keeps up to builds_keep_revisions intact. See configuration.

Contributing

You are free to contribute on this project. I want this project to become better, just like you do.

If you want to contribute, please create a fork, and make a pull request.

Please note that your pull request needs to comply to these rules:

Local installation

Code checks

Code must pass code checks to be used in this project.

You can also let the code checker try to fix problems by itself.

Note: This only fixes common problems. You may need to still fix some yourself.


All versions of sftp-deploy with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
league/flysystem Version ^1.0
league/flysystem-sftp Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mentosmenno2/sftp-deploy contains the following files

Loading the files please wait ....