create an alias to multiple hosts #3465
Unanswered
shopapps
asked this question in
Help needed
Replies: 1 comment 1 reply
-
host('production1.mywebsite.co.uk', 'production2.mywebsite.co.uk')
- ->set('alias', 'production')
->setHostname('mywebsite.co.uk')
->setRemoteUser('forge')
->setIdentityFile( '~/.ssh/id_rsa')
- ->set('stage', function () {
- return (input()->hasOption('stage')) ? input()->getOption('stage') : 'production';
- })
+ ->set('stage', 'production')
->set('branch', function () {
return (input()->hasOption('branch')) ? input()->getOption('branch') : 'master';
})
->setDeployPath('{{root_dir}}/{{application}}/{{stage}}')
->set('labels', [
'type' => 'laravel',
'env' => 'production',
])
; Deploy with:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Superbrains out there...
The scenario:
let's say I have 6 staging and 6 production web servers behind a loadbalancer. Each one is individually accessible via
...
or...
...
The deploy command I would like
What I am trying to achieve (and just can't get my head around how to do it without an interim bash script) is to have a simple deploy command for my devs to use, so they don't cock things up during deployment... :-)
I would like this to then deploy to all of our staging servers the same code
then for production we would like to do:
then the equivalent for rollback
currently, it seems like we would have to run multiple commands to achieve this:
Does anyone out there have a small snippet of their deploy.php file they can share to give me some hints on how to achieve this?
as a start point I tried this in my deploy.php
(yes I'm using forge, and no I don't want to use the built-in forge deployment script as it's a pain when you have lots of different frontend and backend production servers to deploy to at the same time - lol ):
but this triggers an error:
how to test it
To test I would like to be able to do this:
in deploy.php
then run
expected behaviour
multiple responses from lots of servers.
current behaviour
Beta Was this translation helpful? Give feedback.
All reactions