zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

Allow appInstall to <default-server> vhost #75

Closed PhearZero closed 8 years ago

PhearZero commented 8 years ago

Currently no option in appInstall to let the application use a zend server "default-server" vhost

slaff commented 8 years ago

@PhearZero - the installApp command has an option called "baseUri". Use it to point which existing zend server vhost you want to use. Let say you have a vhost called mycompany.com then you can deploy your application and link it to that host using a command similar to the one below

php zs-client.phar --zpk=<path/to/application>.zpk --baseUri=http://mycompany.com --target=<zend-server-target-name>
PhearZero commented 8 years ago

Sorry for the delay. I am refering to the default vhost which can be deployed via the lighttp GUI as well as zs-manage via the appDeploy with the -d flag. I can deploy no problem to custom vhosts. I am using the ZendBamboo pattern which uses zs-client. There is no way in the cli to deploy to the default vhost via zs-client as it does with zs-manage app-deploy -p build.zpk -d

slaff commented 8 years ago

Ok, yes it is possible to deploy on the default vhost. Just use the following flag --defaultServer=TRUE. From the help of the command you can see that

php zs-client.phar installApp --help 

--defaultServer =TRUE allows to "Deploy the application on the default server. The provided base URL will be ignored and replaced with ''. If this parameter and createVhost are both used, createVhost will be ignored. The default value is FALSE."

Example:

php zs-client.phar --defaultServer=TRUE --zpk=<path/to/application>.zpk --baseUri=http://mycompany.com/some/path --target=<zend-server-target-name>