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

Related tags

Deployment pomander
Overview

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

Comments
  • Getting hung up at :setup

    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.

    opened by scottzirkel 19
  • SSH connection

    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.

    opened by nlemoine 14
  • Respond to password prompts

    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.

    enhancement 
    opened by tamagokun 13
  • SSH Error:

    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
    
    opened by h4cc 7
  • How to upload on several servers?

    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?

    opened by odombrovskyi-dev 6
  • Better deploy update

    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)
    opened by leopoiroux 6
  • Analog of Capistrano :linked_dirs

    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

    opened by blumfontein 4
  • Using SVN getting: bash: git: command not found

    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.

    bug 
    opened by guice 4
  • GIT $env->branch() don't work

    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

    opened by leopoiroux 4
  • FUCK SSH2 EXTENSION.

    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.

    opened by tamagokun 3
  • Better rollback mechanism

    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.
    opened by tamagokun 3
  • $task_name can be undefined in Cli.php

    $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.

    opened by mekras 12
  • Heroku Deployments

    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

    question 
    opened by tamagokun 0
  • Deploy in an existing directory

    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

    opened by leopoiroux 2
  • [WIP] method based deployment

    [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
    opened by tamagokun 2
  • deploy.lock

    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.

    question feature 
    opened by tamagokun 2
Releases(1.0.1)
Owner
Mike Kruk
Developer/founder @ripeworks
Mike Kruk
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

Phabel 219 Dec 31, 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

Rocketeer 2.7k Dec 18, 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

Phacility 12.3k Dec 27, 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

SourceBroker 24 Dec 11, 2022
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.

Deployer 9.7k Jan 1, 2023
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

The Laravel Framework 1.5k Dec 20, 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

Andrés Montañez 685 Dec 25, 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 =

Julien Brochet 87 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

The Phing Project 1.1k Jan 7, 2023
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

David Alger 223 Dec 2, 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.

Hammerstone 624 Dec 30, 2022
Deploy your PHP code

php-deploy Deploy your PHP code, e.g. to a shared hosting. The only requirement on the deployment destination server is PHP and the ZIP extension. Usa

Simon Hatt 0 Jan 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

The Rain Lab 16 Nov 26, 2022
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

null 6 Dec 7, 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

Phabel 219 Dec 31, 2022
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

Tomas Verhelst 26 Dec 12, 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 41 Dec 24, 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

Planetary Quantum GmbH 0 Aug 9, 2022