All Projects → dg → Ftp Deployment

dg / Ftp Deployment

Licence: other
A tool for automated deployment of web applications to an FTP server.

Projects that are alternatives of or similar to Ftp Deployment

Ftpbucket
FTPbucket is a PHP script that enables you to sync your BitBucket or GitHub repository with any web-server
Stars: ✭ 99 (-81.21%)
Mutual labels:  ftp, ssh
Wordmove
Multi-stage command line deploy/mirroring and task runner for Wordpress
Stars: ✭ 1,791 (+239.85%)
Mutual labels:  ftp, ssh
Winscp
WinSCP is a popular free SFTP and FTP client for Windows, a powerful file manager that will improve your productivity. It supports also Amazon S3, FTPS, SCP and WebDAV protocols. Power users can automate WinSCP using .NET assembly.
Stars: ✭ 794 (+50.66%)
Mutual labels:  ftp, ssh
Brutedum
BruteDum - Brute Force attacks SSH, FTP, Telnet, PostgreSQL, RDP, VNC with Hydra, Medusa and Ncrack
Stars: ✭ 212 (-59.77%)
Mutual labels:  ftp, ssh
teamcity-deployer-plugin
Deployer plugin for TeamCity CI server
Stars: ✭ 37 (-92.98%)
Mutual labels:  ssh, ftp
Ftpgrab
Grab your files periodically from a remote FTP or SFTP server easily
Stars: ✭ 300 (-43.07%)
Mutual labels:  ftp, ssh
Getssl
obtain free SSL certificates from letsencrypt ACME server Suitable for automating the process on remote servers.
Stars: ✭ 1,687 (+220.11%)
Mutual labels:  ftp, ssh
Hfish
安全、可靠、简单、免费的企业级蜜罐
Stars: ✭ 2,977 (+464.9%)
Mutual labels:  ftp, ssh
pyftpsync
Synchronize directories using FTP(S), SFTP, or file system access.
Stars: ✭ 85 (-83.87%)
Mutual labels:  synchronization, ftp
Sync
syncs your local folder with remote folder using scp
Stars: ✭ 293 (-44.4%)
Mutual labels:  ftp, ssh
Openiothub
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Stars: ✭ 371 (-29.6%)
Mutual labels:  ftp, ssh
Stowaway
👻Stowaway -- Multi-hop Proxy Tool for pentesters
Stars: ✭ 500 (-5.12%)
Mutual labels:  ssh
Ssh
A lightweight package to execute commands over an SSH connection
Stars: ✭ 468 (-11.2%)
Mutual labels:  ssh
Phpseclib
PHP Secure Communications Library
Stars: ✭ 4,627 (+777.99%)
Mutual labels:  ssh
Filestash
🦄 A modern web client for SFTP, S3, FTP, WebDAV, Git, Minio, LDAP, CalDAV, CardDAV, Mysql, Backblaze, ...
Stars: ✭ 5,231 (+892.6%)
Mutual labels:  ftp
Ssh Auditor
The best way to scan for weak ssh passwords on your network
Stars: ✭ 516 (-2.09%)
Mutual labels:  ssh
Php Docker Boilerplate
🍲 PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Stars: ✭ 503 (-4.55%)
Mutual labels:  ftp
Ssh Chat
Chat over SSH.
Stars: ✭ 4,512 (+756.17%)
Mutual labels:  ssh
Gbt
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Stars: ✭ 457 (-13.28%)
Mutual labels:  ssh
Soundsync
Virtual cables between any audio source and any speaker in your home
Stars: ✭ 453 (-14.04%)
Mutual labels:  synchronization

FTP Deployment: smart upload

Downloads this Month Tests Latest Stable Version License

FTP deployment is a tool for automated deployment to an FTP server.

There is nothing worse than uploading web applications to FTP server manually, using tools like Total Commander. (Although, editing files directly on the server and then trying to keep some kind of synchronization is even worse ;-)

Once the process is automated, it costs you a fraction of time and minimizes the risk of error (didn't I forget to upload some files?). There are lots of sophisticated deploying techniques available today, but many people are still using FTP. This tool is designed for them.

Support Me

Do you like FTP Deployment? Are you looking forward to the new features?

Buy me a coffee

Thank you!

How it Works

FTP Deployment is a script written in PHP and will automate the entire process. Just say which local folder to upload and where. This information is stored in a deployment.ini text file, which you can associate with deployment script, so deployment will become a one click thing.

php deployment deployment.ini

And what does the deployment.ini file contain? Only the remote item is required, all the others are optional:

; log file (defaults to config file with .log extension)
log = ...

; directory for temporary files (defaults to system's temporary directory)
tempDir = /temp/deployment

; enable colored highlights? (defaults to autodetect)
colors = yes

[my site] ; Optional section (there may be more than one section).
; remote FTP server
remote = ftp://user:[email protected]/directory
; you can use ftps://, sftp://, file:// or phpsec:// protocols (sftp requires SSH2 extension; phpsec uses phpseclib library)

; do not like to specify user & password in 'remote'? Use these options:
user = ...
password = ...

; FTP passive mode
passiveMode = yes

; local path (optional)
local = .

; run in test-mode? (can be enabled by option -t or --test)
test = no

; files and directories to ignore
ignore = "
	.git*
	project.pp[jx]
	/deployment.*
	/log
	temp/*
	!temp/.htaccess
"

; explicit list of files and directories to include (by default includes all files and directories)
include = "
	/app
	/app/*
	/index.php
"

; is allowed to delete remote files? (defaults to yes)
allowDelete = yes

; jobs to run before uploading
; local jobs are done even if there is no need for synchronization
before[] = local: git diff-index --quiet HEAD  ; ensures Git working directory is clean
before[] = local: composer install --no-dev --classmap-authoritative  ; installs production vendor
before[] = local: lessc assets/combined.less assets/combined.css
before[] = http://example.com/deployment.php?before

; jobs to run after uploading and before uploaded files are renamed
afterUpload[] = http://example.com/deployment.php?afterUpload

; directories to purge after uploading
purge[] = temp/cache

; jobs to run after everything (upload, rename, delete, purge) is done
; local jobs are done even if the synchronization did not take place
after[] = remote: unzip api.zip
after[] = remote: chmod 0777 temp/cache  ; change permissions
after[] = upload: config.server.neon app/config.local.neon
after[] = http://example.com/deployment.php?after
after[] = local: git reset HEAD --hard   ; reverts all changes in working directory

; files to preprocess (defaults to none)
preprocess = *.js *.css

; file which contains hashes of all uploaded files (defaults to .htdeployment)
deploymentFile = .deployment

; default permissions for new files (defaults to none)
filePermissions = 0644

; default permissions for new directories (defaults to none)
dirPermissions = 0755

In the config file you can create multiple sections (like [my site]), so you may have separate rules for data and for application.

Configuration can also be stored in a PHP file.

In test mode (with -t option) uploading or deleting files is skipped, so you can use it to verify your settings.

Item ignore uses the similar format to .gitignore:

log - ignore all 'log' files or directories in all subfolders
/log - ignore 'log' file or directory in the root
app/log - ignore 'log' file or directory in the 'app' in the root
data/* - ignore everything inside the 'data' folder, but the folder will be created on FTP
!data/db/file.sdb - make an exception for the previous rule and do not ignore file 'file.sdb'
project.pp[jx] - ignore files or folders 'project.ppj' and 'project.ppx'

Before the upload starts, after it finishes and after all jobs, you can execute commands or call your scripts on the server (see before, afterUpload, after), which can, for example, switch the server to a maintenance mode. If you use PHP config, you can run lambda function with deployment environment:

<?php

return [
	'remote' => 'ftp://user:[email protected]/directory',
	'local' => '.',
	'before' => [
		function (Deployment\Server $server, Deployment\Logger $logger, Deployment\Deployer $deployer) {
			... do something
		},
	],
	...
];

Syncing a large number of files attempts to run in (something like) a transaction: all files are uploaded with extension .deploytmp and then quickly renamed.

An .htdeployment file is uploaded to the server, which contains MD5 hashes of all the files and is used for synchronization. So the next time you run deployment, only modified files are uploaded and deleted files are deleted from server (if it is not forbidden by the allowDelete directive).

Uploaded files can be processed by a preprocessor. These rules are predefined: .css files are compressed using the clean-css and .js are minified by UglifyJS or UglifyES (both via Node.js tool).

There is also a rule for expanding mod_include Apache directives. For example, you can create a file combined.js:

<!--#include file="jquery.js" -->
<!--#include file="jquery.fancybox.js" -->
<!--#include file="main.js" -->

This tool will combine scripts together and minify them with the Closure Compiler to speed-up your website.

Installing FTP Deployment

FTP Deployment 3.x requires PHP 7.1 or later (version 2.x requires PHP 5.4 or newer). It also requires openssl extensions for ftps:// and SSH2 extension for sftp:// connections.

The easiest way to obtain FTP Deployment is to download a single PHAR file.

If you want to use minification, install Node.js and UglifyES for JavaScript minification and clean-css for CSS minification.

npm install uglify-es -g
npm install clean-css-cli -g

Or you can install it using Composer:

composer create-project dg/ftp-deployment

Are you looking for php_ssh2.dll?

Need SSH authenticate using a public key?

publicKey = '/key/id_rsa.pub'
privateKey = '/key/id_rsa'
passPhrase = 'yourpass' #optional - If needed passphrase for privateKey
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].