-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[7.0-beta] Multiple deployments to same host? #2555
Copy link
Copy link
Closed
Description
- Deployer version: 7.0.0-beta.23
- Deployment OS: Ubuntu 20.04.2 LTS
How do I define two deployments onto the same host in Deployer 7?
With Deployer 5 and 6, we had this working:
// Hosts
host('stage')
->hostname('mytarget.example.org')
->user('deploy-stage')
->stage('stage')
->set('deploy_path', '/home/deploy-stage/www')
->set('branch', 'develop')
;
// Hosts
host('prod')
->hostname('mytarget.example.org')
->user('deploy-prod')
->stage('prod')
->set('deploy_path', '/home/deploy-prod/www')
->set('branch', 'develop')
;
I tried to do it like this:
// Hosts
host('mytarget.example.org')
->set('user', 'deploy-stage')
->set('stage', 'stage')
->set('deploy_path', '/home/deploy-stage/www')
->set('branch', 'develop')
;
host('mytarget.example.org')
->set('user', 'deploy-prod')
->set('stage', 'prod')
->set('deploy_path', '/home/deploy-prod/www')
->set('branch', 'master')
;
which fails (obviously) with the following error:
Host "mytarget.example.org" already exists.
If you want to override configuration options, get host with getHost function.
getHost('mytarget.example.org');
Unfortunately, 7.0.0-beta is the only version right now compatible with PHP 8.0, which we use for this new project.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels