Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
edvordo
@edvordo
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.
poniatowski
@poniatowski
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
idk
edvordo
@edvordo
I don't know Phinx, but if it uses transactions, that will lock your db if your migrations take too long
poniatowski
@poniatowski
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.
edvordo
@edvordo
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
poniatowski
@poniatowski
Yeah, i will need to find good solution for that
poniatowski
@poniatowski
Anyone? :)
poniatowski
@poniatowski
Hi! Does anyone use docker with Phinx?
Joseph Richardson
@EHLOVader
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
@mattsimpson_gitlab

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):

host('prod[01:05].example.org')
    ->stage('production')

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

host('production')
    ->hostname('prod[01:05].example.org')

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.
Matt Simpson
@mattsimpson_gitlab
Seems pretty quiet in here.
@antonmedv I believe the commits included with the v6.8.0 release tag are missing from the 6.x branch. If I understand it correctly master will be v7, which currently includes breaking changes.
Spencer Brower
@sbrow
Does anyone know an easy way to get Deployer working with laravel when you want to deploy to /var/www/{{application}} as a non-root user? The only way I've found so far is to re-write all the tasks to use sudo and I'd rather not resort to that.
edvordo
@edvordo
(just to make it perfectly clear, I'm not a linux pro .. that being said ..)
I'd approach this by creating a non-sudo user that has privileges to write to whatever directory you need him to to make your sites work and use that user during deployment. May not be a bad idea to make him a member of your www-data group, so that he can also run queues for example. Also possibly not a bad idea to have a user per application running on your server.
There are guides on the internet that will help you achieve all of this.
Spencer Brower
@sbrow
@edvordo Thank you! That makes the most sense to me as well.
Kevin Minkol
@johnkevson_gitlab

Hello, I get some issue when i launch php vendor/bin/dep deploy -vvv. I have this issue : ✈︎ Deploying master on rl-location.com
• done on [rl-location.com]
➤ Executing task deploy:prepare
[rl-location.com] > echo $0
[rl-location.com] < ssh multiplexing initialization
[rl-location.com] < sh: ssh: not found
➤ Executing task deploy:failed
• done on [rl-location.com]
✔ Ok [4ms]
➤ Executing task deploy:unlock
[rl-location.com] > rm -f ~/www/.dep/deploy.lock
[rl-location.com] < ssh multiplexing initialization
[rl-location.com] < sh: ssh: not found

In Client.php line 103:

[Deployer\Exception\RuntimeException (-1)]
The command "rm -f ~/www/.dep/deploy.lock" failed.

Exit Code: -1 (Unknown error)

Can you help me please ?
Kevin Minkol
@johnkevson_gitlab
This is my deploy.php => https://hastebin.com/hijunojiqe.xml
edvordo
@edvordo
How do you normally SSH to the server? Seems like the ssh command is missing from you system.
Kevin Minkol
@johnkevson_gitlab
Eureka3
I use docker container for php
but this container didn't have ssh tools
Kevin Minkol
@johnkevson_gitlab
Another error, right here
✈︎ Deploying master on ssh.cluster028.hosting.ovh.net
• done on [ssh.cluster028.hosting.ovh.net]
➤ Executing task deploy:prepare
[ssh.cluster028.hosting.ovh.net] > echo $0
[ssh.cluster028.hosting.ovh.net] < Warning: Permanently added 'ssh.cluster028.hosting.ovh.net,54.37.121.233' (ED25519) to the list of known hosts.
Enter passphrase for key '/etc/.ssh/id_rsa':
[ssh.cluster028.hosting.ovh.net] < bash
[ssh.cluster028.hosting.ovh.net] > if [ ! -d ~/www ]; then mkdir -p ~/www; fi
[ssh.cluster028.hosting.ovh.net] < Warning: Permanently added 'ssh.cluster028.hosting.ovh.net,54.37.121.233' (ED25519) to the list of known hosts.
Enter passphrase for key '/etc/.ssh/id_rsa':
it asked me the passphrase
and it fails at the third try
edvordo
@edvordo
Have you generated that ssh key?
Alexander Borisov
@BoShurik

Hello! How can I achieve something like this?


if (input()->hasArgument('stage') && input()->getArgument('stage') === STAGE_STAGING) {
    set('repository', 'repository1');
} else {
    set('repository', 'repository2');
}

Now I got Uncaught Error: Call to a member function getInput() on boolean

edvordo
@edvordo

I'd add this on the host definition

host('stagin.example.com')
  ->stage(STAGE_STAGING)
  ->set('repository', 'repository1');

host('prod.example.com')
  ->stage(STAGE_PRODUCTION)
  ->set('repository', 'repository2');

unless, of course, you are deploying to the same host, which I don't know why you would ..

safazi
@safazi
greetings, how would I go about deploying into a host that is on another host, i.e. I have to ssh into a machine, then deploy to a machine on that network?
Owen
@owenfar
Hey everyone. I've recently started using Deployer and I was quite happy how simple it was to set up and everything was so smooth. Something I thought about from the beginning is how does deployer know the credentials to connect to my host server? In the host configuration, I only set the IP and user.. how does it go with validating the connection? I'm asking because now for some reason I'm getting a: "Permission denied (publickey)" error. Not sure what happened.. but how can I point to the public key I have on my local computer? Thanks in advance
Owen
@owenfar
Is it related to ->configFile('~/.ssh/config')?
Owen
@owenfar
I still can't figure this one out. I feel like the documentation is missing some info regarding this. I don't understand if the error is related with connecting to GIT or my server, but dep ssh gives the same error. I would still like to know how deployer gets the permission to connect with server, I can't find this anywhere on the docs. Please if anyone can help, I would appreciate it a lot.
I'm on an EC2 instance, just in-case anyone is wondering :)
Owen
@owenfar
I just had to point to the right pem file using ssh -i... Would have been helpful to have something like this in the docs.
Frederick Henderson
@frederickjh
@safazi To deploy to a host that has a jump host in between, I would highly recommend that you setup the ssh jump in your ~/.ssh/config file and use ssh keys. Once this has been done, so that from the command line you can type ssh Host and be sitting at a command prompt of the machine to deploy to, you should be ready to go. Note in ~/.ssh/config on the Host line you can specify one or more names that you can use to ssh in. Host is different than HostName in ~/.ssh/config. For the jump host setup look at the ProxyJump and ProxyCommand lines. Depending on the versions of Open ssh you may or may not be able to use ProxyJump. If not use ProxyCommand and netcat. Something like this: ProxyCommand ssh hostnameoripaddress netcat -w 120 %h %p.
Frederick Henderson
@frederickjh
@safazi More information on ssh Jump Hosts.
Elie Makany
@eliemakany_gitlab
Hi all, can i have a link to a ressource to help me deploye a Symfony 5 application using deployer ? My application user migrations, webpack encore, ... Thanks for you help.
Tim
@timkley
Hi everyone, are the releases down? https://deployer.org/releases/v6.8.0/deployer.phar is not working anymore.
In fact, all inks on https://deployer.org/download/ aren't working anymore
Otto Szika
@ottoszika
Hi @timkley, it is down for me also. 403 :|