Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
@edvordo thanks
Pascal Krason
@edvordo If you meant me, thanks. I used bitbucket at my work before - awesome software. But on-premise is too expensive & i don’t need that much features; so i switched to gittea. Has all basic features i need, does not take lot of resources & is fairly easy to manage without consuming too much time maintining it. For CI/CD is drone a great tool. Small & just right for me
Well, you mentioned Jira, so I assumed you use Bitbucket. But sure, whatever fits your needs :)
Hi everybody :)
Is there someone here using docker in prod, and deploying the project with deployer ? I'm trying to, but I don't understand how to do it, because some commands have to be executed on the server, and some others in the container. I don't find information about that ! If someone can help me ... :)
Frederick Henderson
By the server do you mean the Docker Host?
@frederickjh Yes :)
Frederick Henderson
Are you deploying from the Docker host or from another computer?
@frederickjh From an other computer.
Frederick Henderson
I am not sure there. I know there is a way to run commands locally but not sure about on an intermediary host.
Sacharski Bartłomiej
Hello. I am trying to start using deployer in one of my projects and I'm currently experiencing a problem.
What I'm trying to do is connect via ssh to the server using user A credentials, and then switch to user B and clone the repo to release directory.
I've set up the host with the become('B') directive, however the deploy:update_code code is still being executed as user A. Is sudo-ing as another user not supported when running git command?

I have a Symfony 3 application that I'm deploying with Deployer, but I've recently started using FosJsRoutingBundle so I have to run this additional build step:

bin/console fos:js-routing:dump --format=json

What's the best practice for adding that?


My deploy.php is really simple at the moment:

// Tasks
task('build', function () {
    run('cd {{release_path}} && build');

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

// Migrate database before symlink new release.
before('deploy:symlink', 'database:migrate');
Matthew Weier O'Phinney

I've been looking through the docs, code base, and issues, and I'm still not finding the information I need: How do I distribute recipes others can use in their deploy.php?

Considering the deploy.php may or may not be in the same repository as the code being deployed, and considering you likely don't want the package installed in your production application, how can I provide my recipes for others to use? Does it require being installed as a global composer package? or is there some other mechanism?

Your custom recipe doesn't need to be in the production application. You only need it while deploying so it can be a dev dependency. That being said, if you have some new recipe, you can try PRing it into https://github.com/deployphp/recipes
Frederick Henderson
Actually @edvordo deployphp/recipes has been moved to the main project recently. There hasn't been a release since then.
Oh, I didn't notice, sorry.
Aarrr, I'm running into TTY mode requires /dev/tty to be read/writable issue and setting git_tty to false isn't helping. I'm using github actions, any pointers? deployphp/deployer#1713
resolved, turned out one of my run commands override tty to true. now i'm back with another error: Host key verification failed. :/
hi there!
ive got a strange error when running deployer to deploy a laravel app
Uninitialized "output" in Deployer container.
and, when run without a command... Call to undefined method Deployer\Host\Host::stage()
->set('branch', 'staging')
->set('deploy_path', '/var/hosting/sites/{{application}}_staging');
any idea please?
Robin Houtevelts


I'm investigating to see if deployer would be a good fit to use in our company.

I find the docs a bit lacking so I'm trying my luck here:

How would someone go about trying to achieve this scenario:

I have one backend server and three frontend servers that are in a loadbalancer and have database replication with the backend server. I want to deploy the frontend servers one by one.

So basically these steps:

  • Stop replication on frontend hosts
  • Run migrations against the backend server
  • Loop over the frontend hosts and:
    • Remove it from loadbalancer
    • Place code
    • Start replication
    • Insert back into loadbalancer

We are currenty using an in-house solution in nodejs and bash. But would prefer to have something in PHP because our devs are comfortable in it.

Robin Houtevelts
Been going over the project again and seems like I'll be able to do this
Matt Fletcher
Hello, I'm building my project locally before deploying the built files (the server is on a Raspberry Pi Zero which isn't beefy enough to run composer and npm locally). I've followed the instructions as detailed in the "Build server" section of https://deployer.org/docs/advanced/deploy-strategies.html, setting the user in the host call, but when it gets to the upload task, it prompts me for the password for my local user, rather than the one I've set in the host. Can anyone suggest what I might have done wrong?
Rob Zaar
On the hosts page on deployer.org https://deployer.org/docs/hosts.html it says, "Deployer uses sudo privilege escalation method by default." Is there an explanation of this somewhere? Separate but related question: What should the setup be for the user used by deployer on the host server? More specifically, should the user used by deployer have sudo access without requiring a password for any command? Is there somewhere where this is all explained?
hello, the package deployer/recipes is abandoned and the receipts are moved to deployer github. how do i install those now?
Hi Guys!
Does Deployer create locks on database tables (postgtresql)?
Deployer itself doesn't touch database. Your deploy script might. Most of the recipes have a section that run used-framework-specific migrations, depending on the framework, this might lock your DB.
I use Phinx for migration/seeds
I'm looking for the option to run these with zero downtime development
Phinx seems to use SQL transactions, but I can't see option for 0 downtime migration
I don't know Phinx, but if it uses transactions, that will lock your db if your migrations take too long
Not sure, transaction and lock timeout seem to be two different things
It seems like not many PHP devs use migrations
There is practically nothing in google about it
SQL transaction is more to make insert's/update's/delete's than adding DB structure.
It certainly wasn\t very popular, to have migrations until semi-recently. Granted, Phinx seems to be CakePHP related library, so it should be somewhat popular.
That being said, I don't see why it would use transactions for DB migrations. The lock may be caused by a huge table (lots of columns and records in it), I had to deal with this recently a table of 120 columns and over 1.5 million records. Couldn't even modify columns, the update just didn't complete.
Not saying that is your problem, just throwing ideas what you may look into
Yeah, i will need to find good solution for that
Anyone? :)
Hi! Does anyone use docker with Phinx?
Joseph Richardson
Hello all, I was looking into writing a fresh deploy.php and had noticed on some old ones I got notices that recipes is deprecated, but seems that recipes is still a WIP for v7 release? is v7 available yet? I tried self update and got back that I'm already up to date, on 6.8.0
Matt Simpson

Hey all. I am investigating converting to Deployer from Capistrano and came across a requirement I couldn't quite figure out.

I get that I can do this (which is awesome):


But is there any way for me to do something like this:


It doesn't seem to work.

We have multiple environments (develop, qa, staging, training, production), and sometimes they're on the same host, sometimes not.