Deploy your PHP with PHP. Inspired by Capistrano and Vlad.

Last update: Jun 4, 2022

Pomander

Latest Stable Version

Gitter chat

A light-weight flexible deployment tool for deploying web applications. This project was inspired by Capistrano and Vlad the Deployer, as well as being built on top of Phake, a Rake clone.

This project came out of the need for a way to deploy Wordpress sites to multiple environments easily and without firing up FTP clients, etc. What started as a simple Rakefile, quickly grew into much more, and has been finally abstracted and ported to PHP to be able to fully integrate tasks with your application.

Getting Started

Make sure you have composer installed:

$ curl -s https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Need help installing composer?

Installation

$ composer global require pomander/pomander:@stable

If you haven't added composer's global bin folder to your $PATH, better do that now:

$ echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc

Substitute .bashrc with whatever you use.

Setting up a project

$ pom init

Refer to the documentation for a full list of commands and references for configuring environments.

Plugins

GitHub

https://github.com/tamagokun/pomander
Comments
  • 1. Getting hung up at :setup

    I have setup my first pomander deploy and after running :setup it seems to get hung on

    * info deploy setting up environment
    

    It looks like it has created the shared and releases directories, but nothing happens after that.

    Also, if I remove $env->releases('true') it deletes the parent directory (one that I created, not pomander). Not sure if that's the intended action, seems off.

    Reviewed by scottzirkel at 2014-01-16 02:47
  • 2. SSH connection

    Hi, I'm used to Capistrano and deployers and really enjoy you built one made of PHP.

    But I'm having an issue : the script can't connect through ssh to my server. I tried to set the key path with $env->key_path('/System/Users/Username/.ssh/id_rsa') but I'm still getting the "Unable to load RSA key" message. I digged a little in the source code. The loadKey method from phpseclib is always returning false, I can't figure out why.

    How do you manage to make it work ? I'm having no trouble connecting through my console.

    Reviewed by nlemoine at 2013-09-09 19:34
  • 3. Respond to password prompts

    If remote deployments require passwords after the initial SSH connection, Pomander is currently unable to handle them.

    It would be great if Pomander could auto-respond to these prompts with a password or key_password from the environment config, or if the prompt could be presented to the user to provide input.

    Reviewed by tamagokun at 2014-01-16 16:18
  • 4. SSH Error: "Unable to load RSA key."

    I tried to deploy with pomander, but it fails with my working SSH Key. A plain ssh login works.

    Error message:

     * abort ssh Unable to load RSA key.
    

    Tried against ǜersion "pomander/pomander": "dev-master".

    The head of my private key:

    $ cat .ssh/id_rsa
    -----BEGIN RSA PRIVATE KEY-----
    Proc-Type: 4,ENCRYPTED
    DEK-Info: AES-128-CBC,E731CBEFD26F9C7560C79A3E7C53C516
    
    Reviewed by h4cc at 2014-06-20 09:01
  • 5. How to upload on several servers?

    I have code like this: $env->user('user'); $env->repository('repo'); $env->scm('svn'); $env->deploy_to('/var/web'); $env->key_path("key"); $env->app(array('server1.com','server2.com'));

    When i run deploy:update this command perform deploy only on the first server in the list. It there some additional options that enables deploying process on multiple servers?

    Reviewed by odombrovskyi-dev at 2014-07-28 17:32
  • 6. Better deploy update

    • git ls-remote don’t work on revision)
    • don’t return avoid function abort()
    • never composer:update on deploy always install (with ""update" you do not know exactly what is deployed)
    • composer disable by default
    • .git_ignore ".idea" (project of PHPStorm IDE)
    Reviewed by leopoiroux at 2014-01-10 07:51
  • 7. Analog of Capistrano :linked_dirs

    Hello!

    Sorry, if I have missed something, but is there in Pomander feature like :linked_dirs in Capistrano? This feature allows to put directories to shared folder and creates symlinks to these directories in the releases dirs.

    There is a shared folder in Pomander, but I didn't find any option to create symlinks neigher in the docs, nor in the code.

    Best regards

    Reviewed by blumfontein at 2014-08-06 05:02
  • 8. Using SVN getting: bash: git: command not found

    I'm trying out pomander, but I can't get it function. My config:

    <?php 
    $env->repository('http://<svn-repository>')
        ->releases(true)
        ->keep_releases(5)
        ->user('<me>')
        ->scm('svn')
        ->revision('trunk')
        //
        ->backup(true)
    ;
    
    //
    // If you are deploying your application to a remote server:
    //
    $env->deploy_to('/usr/src/build/pom/track');
    $env->app('<internal ip>');
    

    When trying to check the setup, I get the following error:

    hermes:pom gp$ pom deploy:setup
    (in <my dir>)
     * info target <host ip>
     * info deploy setting up environment
    bash: git: command not found
     * abort fail aborted!
    

    I'm not using git. git isn't on the server. But SVN is. And I am trying to use SVN.

    Reviewed by guice at 2014-05-28 17:31
  • 9. GIT $env->branch() don't work

    Today this method does not work and I added the ability to update submodules. Just add $env->submodule(true/false)

    I also changed the log in the revision method

    Reviewed by leopoiroux at 2014-01-06 22:04
  • 10. FUCK SSH2 EXTENSION.

    the SSH2 extension, like proc_open, is garbage. So many bugs that I dropped it completely.

    This pull request goes BACK to using phpseclib with some modifications:

    1. send request-pty bits in $ssh->exec() to get a pty. woo!
    2. return the exit status of the ssh command.

    Things like host key checking work wonderfully.

    Reviewed by tamagokun at 2013-01-17 18:29
  • 11. Better rollback mechanism

    Rollback are... well, weird. Need to support the following:

    • $app->env->releases == true?
      • false
        • checkout previously deployed hash
      • true
        • remove current/failed release
        • if finalize was called, re-set the symlink
    • db:merge has run and backup exists?
      • true
        • restore the latest backup.
    Reviewed by tamagokun at 2013-01-09 17:35
  • 12. $task_name can be undefined in Cli.php

    In Cli.php TaskNotFoundException can be thrown by print_tasks method, so here variable $task_name will be undefined.

    Unfortunately at this time no way to get missed task name here, but I've create PR to Phake in order to solve this.

    Reviewed by mekras at 2014-10-06 08:36
  • 13. Heroku Deployments

    Cataloging notes and ideas about being able to manage deployments to Heroku via Pomander.

    This should be a straightforward process as Heroku takes care of nearly everything for us. Pomander just really needs to run the key deploy tasks with empty commands so that before/after hooks can be triggered, and anything special can be taken care of.

    Notes:

    Example Capistrano task for deploying to Heroku:

    namespace :deploy do
      desc 'Deploy the app'
      task :production do
        app = "my-amazing-heroku-app-name"
        remote = "[email protected]:#{app}.git"
    
        system "heroku maintenance:on --app #{app}"
        system "git push #{remote} master"
        system "heroku run rake db:migrate --app #{app}"
        system "heroku maintenance:off --app #{app}"
      end
    end
    

    Using a Composer plugin to trigger pom heroku

    Just rely on heroku run: heroku run vendor/bin/pom heroku

    Reviewed by tamagokun at 2014-08-06 13:04
  • 14. Deploy in an existing directory

    Hi Mike, I made ​​a change for authorized to clone in a directory that already exists. This need appears if the directory is an NFS mount (with Vagrant for example). You can not remove this mount point :( Thank you

    Reviewed by leopoiroux at 2014-02-24 11:16
  • 15. [WIP] method based deployment

    This is a rather large re-vamp of how deployment stacks are built.

    Not ready

    Deployments with Pomander have a strict release/no-release structure with some options one of which being scm to help offer a more flexible means to deploy for all projects. Problem is there is no way to break out of this structure and create deployment paths for other things (i.e. Heroku, Docker)

    This new way allows that to happen..

    All deployment related tasks are driven by a Method object. The method ultimately controls exactly how a deployment works. The base Method class implements the standard release / no-release structure for deploying, rolling back, cleanup, finalize, etc. There are stubbed methods for setup_code and update_code that you can sub class and customize to your needs, or just implement all new methods.

    Breaking changes:

    This release will introduce some potential breaking changes for anyone that used the $app->env->scm object. That object is now replaced by method.

    • [x] - Git method
    • [x] - Subversion method
    • [x] - Rsync method
    • ~~[ ] - Heroku method~~ (later)
    • [ ] - New tests with passing current tests
    Reviewed by tamagokun at 2014-01-30 21:37
  • 16. deploy.lock

    While a deploy is running, create a deploy.lock file so that subsequent deploys cannot be happening at the same time.

    Things to look out for:

    If a deploy fails, will it always be able to remove the deploy.lock file? If it cannot, people will be stuck without being able to deploy.

    Reviewed by tamagokun at 2014-01-30 11:48
Related tags
PHP transpiler - Write and deploy modern PHP 8 code, today.

Phabel Write and deploy modern PHP 8 code, today. This is a transpiler that allows native usage of PHP 8+ features and especially syntax in projects a

Aug 9, 2022
Send your projects up in the clouds

Rocketeer is unfortunately not maintained anymore and this repository is archived I recommend to pivot to Deployer and/or CD pipelines The Gitter chat

Aug 5, 2022
Open software engineering platform and fun adventure game

Phabricator is a collection of web applications which help software companies build better software. Phabricator includes applications for: reviewing

Aug 6, 2022
Deployer based deployment for WordPress with media and database synchronisation.

deployer-extended-wordpress What does it do? Should I use "deployer-extended-wordpress" or "deployer-extended-wordpress-composer"? Dependencies Instal

Jun 3, 2021
A deployment tool written in PHP with support for popular frameworks out of the box
A deployment tool written in PHP with support for popular frameworks out of the box

Deployer A deployment tool written in PHP with support for popular frameworks out of the box. See deployer.org for more information and documentation.

Aug 7, 2022
Elegant SSH tasks for PHP.

Laravel Envoy Introduction Laravel Envoy provides a clean, minimal syntax for defining common tasks you run on your remote servers. Using Blade style

Aug 9, 2022
The PHP Deployment Tool

Magallanes What's Magallanes? Magallanes is a deployment tool for made with PHP for PHP applications; it's quite simple to use and manage. For more in

Jul 22, 2022
A deployer library for PHP 5.3

Plum An object oriented deployer library Installation and configuration Plum does not provide and autoloader but follow the PSR-0 convention. $plum =

Feb 5, 2022
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.

P H I N G Thank you for using PHING! PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant. You can do anything wit

Aug 4, 2022
Magento 2 specific tasks for Capistrano 3

Capistrano::Magento2 A Capistrano extension for Magento 2 deployments. Takes care of specific Magento 2 requirements and adds tasks specific to the Ma

Jul 28, 2022
Deploy and execute non-PHP AWS Lambda functions from your Laravel application.

Sidecar for Laravel Deploy and execute non-PHP AWS Lambda functions from your Laravel application. Read the full docs at hammerstone.dev/sidecar/docs.

Aug 8, 2022
A simple way to deploy your application to a remote location.

Deploy Plugin A simple way to deploy your application to a remote location. Currently in Active Development This plugin is incomplete. This plugin is

Apr 30, 2022
Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.
Quickly deploy a seedbox with self-hosted services and a web portal using Docker and docker-compose.

Seedbox Quickly deploy and configure a seedbox with self-hosted services and a web portal using Docker and a single docker-compose.yml file. Screensho

Jun 6, 2022
PHP transpiler - Write and deploy modern PHP 8 code, today.

Phabel Write and deploy modern PHP 8 code, today. This is a transpiler that allows native usage of PHP 8+ features and especially syntax in projects a

Aug 9, 2022
Build and deploy Non-Fungible Algorand Tokens with Laravel & IPFS
Build and deploy Non-Fungible Algorand Tokens with Laravel & IPFS

Introduction Laravel is a web application framework with an expressive, elegant syntax designed to make developing web apps easier and faster through

Jun 24, 2022
WPCloudDeploy is a WordPress plugin that allows you to easily deploy servers at major cloud-server providers and then install apps
WPCloudDeploy is a WordPress plugin that allows you to easily deploy servers at major cloud-server providers and then install apps

WPCloudDeploy is a WordPress plugin that allows you to easily deploy servers at major cloud-server providers and then install apps

Jul 28, 2022
This is an example app demonstrating how to deploy a php app to runway.

Runway Example php App This is an example app demonstrating how to deploy a php app to runway. clone this repo, and navigate into that directory runwa

Aug 9, 2022
Deploy WordPress websites with ease.

WordPress Deployer Deploy WordPress websites with ease. This package is basically a Deployer "recipe" for WordPress websites. Installation composer re

Dec 23, 2021
Personal Knowledge Management. Use branch "minimal change" to deploy as laravel package.

Knowfox Knowfox is my Personal Knowledge Management system. Having been an keen Evernote user since 2012, I finally got around to taking my precious n

Jun 25, 2022