Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Steen Rabol
@rabol
I hope Google is my friend
Luca Storani
@anistor86
Hi guys, I cannot find this anywhere...deploying using the /.ssh/configl file...in which format shall I write the config file? How can I tell deployer to use the config file?? Thanks in advance
Frederick Henderson
@frederickjh
@anistor86 Simplify Your Life With an SSH Config File That will get you started. Also see man ssh_config.
Steen Rabol
@rabol
Question regarding shared_dirs
/public/images/ is not in my repository so I copied the contents to /shared as public/images and I would then expect that it will be symlinked on each release, but that does not seem to happen, am I doing it wrong ?
Luca Storani
@anistor86
@frederickjh thank you, again!!👍🏻
Frederick Henderson
@frederickjh
@rabol I believe if your files are in shared/public/images/ and you have added public/images to your shared directories, in your config file (deploy.php) or your recipe, it should be linked in on the next deployment. If that does not work I would put public/images directly into the current deployment . Then on the next deploymet it should copy the folder to the shared folder and link it into the deployment.
Steen Rabol
@rabol
@frederickjh yes, i got it working - spelling mistake i think
Frederick Henderson
@frederickjh
:ok_hand:
Steen Rabol
@rabol
Anyone here using deployer for laravel app ?
I have a ‘strange’ issue, the function Log::info(‘something to log’); does not write anything to the log
edvordo
@edvordo
Where do you call it? Within deployer script/step?
Steen Rabol
@rabol
No - sorry, my fault.
I have some ‘scheduled’ jobs that runs every night
and after I have used the deployer, these jobs doe not write anything to the log
There is no error as far as I can see, but the noting is logged either
edvordo
@edvordo
I assume you are triggering those jobs via the scheduler. Does the cron point to the current directory ?
Steen Rabol
@rabol
Hmm.. that is actually a very good point :)
Now it does… Will see in 24 hours if that was the issue - Thanks!
Andy Cowan
@andycowan_gitlab

How do I specify multiple hostnames in the inventory.yml file? I've tried:

.base: &base
  hostname: mercury, venus
  roles: app
  deploy_path: ~/{{application}}

and

.base: &base
  hostname: 
    - mercury
    - venus
  roles: app
  deploy_path: ~/{{application}}

Anyone know?

Frederick Henderson
@frederickjh
@andycowan_gitlab Multiple hosts docs
So, host('110.164.16.59', '110.164.16.34', '110.164.16.50', ...)
Lukas Kalkhoran
@dkbay
Is there anyway I can setup deployer so it doesn't ask me for pwd every time? I was planning to fully automate deployment for when I push to master or whichever branch
Steen Rabol
@rabol
You need to have ssh keys installed correctly
BeepBoop
@AlKappachinox_twitter
Hello, is there a way we can contribute to docs on deployer.org? Currently some of the configuration parameters are displayed wrong because of markdown. For example https://deployer.org/docs/configuration.html#writableusesudo
edvordo
@edvordo
This would most likely be the repo for docs https://github.com/deployphp/docs
BeepBoop
@AlKappachinox_twitter
Thank you!
BeepBoop
@AlKappachinox_twitter
Hello, is there a reason some of the issues are not closed after being resolved?
Frederick Henderson
@frederickjh
Not sure maybe the pull request that solve them do not reference that the fix that issue, and so they do not get closed.
BeepBoop
@AlKappachinox_twitter
It would be nice if we could clean issues. Currently there are over 200 of them and some are duplicates like #1830 and #1827 , some are resolved with pr like #1778 and some are answered questions.
Frederick Henderson
@frederickjh
@AlKappachinox_twitter Maybe you could reach out to the developer and ask if they would like some help with this. Sounds like they could use the help and it sounds like you have an eye for spoting these things.
Basil Mohamed Gohar
@basilgohar
Hey all, I was wondering if someone could point me in the right direction as to how I can maintain a per-host/target config file when using deployer. For example, should I make it be part of a task that just copies them from somewhere on the host into the right location in the current directory, or is there a better way to do it?
alexander-bachurin
@alexander-bachurin
Hi all, can someone describe how custom parameters should work when I use parallel mode. I can read params using get('param') when use -o param=111, but it doesnt work when I run it in parallel mode.
Bogdan Lotarev
@lotarbo

Hi all, in git repo i have folders
-docker
-app

so when i use deployer, on server i have

../releases/1/
            -app
            -docker
../release/
            -app
            -docker

So, its possible to specify subfolder in my repo to be deployed? becouse my laravel app in app folder, so i need only this

edvordo
@edvordo
Deployer clones the repo on the server, so no, not really. Granted, you can try to override the deploy:update_code task (or define your own of course), but then you'd have to figure out a way to get the source to the server ..
Bogdan Lotarev
@lotarbo

@edvordo thanks, i understand how it works, but i think maybe create symlink like :

/releases/1/app -> release/current

mb there are some options for this, and i dont know about this)

edvordo
@edvordo
well, there is a symlinking thing already happening, in deploy:symlink, you could try override that .. also, the release folder is usually deleted after a successful deployment (in you don't use use_atomic_symlink of course), so maybe try overriding that task ..
Also, I'm not aware of (and looking at the source, there does not seems to be) an option to change the current symlink pointer
Also also, what you could do is set the DocumentRoot in you apache vhost config to poiont to path/to/project/current/app
Bogdan Lotarev
@lotarbo

Thank you, the first problem - iam using recipe for laravel, so i need change every tasts like this

task('artisan:migrate:rollback', function () {
    $output = run('{{bin/php}} {{release_path}}/artisan migrate:rollback --force');
    writeln('<info>' . $output . '</info>');
});

to {{bin/php}} {{release_path}}/app/artisan

looks like a need change release_path params, but i dont know how.
i am trying like this

set('release_path', '{{release_path}}/app');

but nothing happens) only errors

Russell Jones
@jonesrussell
I'm confused as to how I can prepare my local repo/laravel install then deploy it to a production server (fully prepared). run composer and npm tasks both on my local.
Dominik Gavrecký
@iGavrilo
Hey guys, i have weird problem with options ... Options paramater is avaible but if i use it or no its ignored and task will exec. Code: https://www.dropbox.com/s/jn6mcrrfxa1g9zr/Screenshot%202019-08-12%2018.31.53.png?dl=0
Thanks
Frederick Henderson
@frederickjh
@iGavrilo Which task in the screenshot is giving you the problem compass or temp?
Dominik Gavrecký
@iGavrilo
compass
@frederickjh
Frederick Henderson
@frederickjh
Are you trying to set the options in the code? I use these on the command line to modify a task or give extra input.

Here is the first part of a task with an option called stage-initial-dbdump.

// Dump Database on dev or live and import it for the initial deployment.
desc('Setup database for new deploy. Will not create the database. Dumps, drops tables and imports database.');
task('initialdeploydatabasesetup', function () {
    $default_stage_initial_dbdump = '{{default_stage_initial_dbdump}}';
    if (input()->hasOption('stage-initial-dbdump')) {
        $stage_initial_dbdump = input()->getOption('stage-initial-dbdump');
    }

In deploy.php I have:

// Default stage to get initial deploy database dump from.
set('default_stage_initial_dbdump', 'live');

This sets the default but I can run the task and change to the dev environment with the following command:

dep initialdeploydatabasesetup --stage-initial-dbdump=dev

I hope that helps!

Frederick Henderson
@frederickjh
@iGavrilo Also see: Using input options.
Dominik Gavrecký
@iGavrilo
@frederickjh thank you
Frederick Henderson
@frederickjh
So maybe to test set('compass', 'true") then check if it is set to true in your task.
Frederick Henderson
@frederickjh
Also, I think that I would not name a task and an option the same name.