-
Notifications
You must be signed in to change notification settings - Fork 2
Deploy an existing application
The following example walks you through the steps for deploying an old PHP application to a selected target (Zend Server or phpCloud).
- Target with id = 0.
###Commands
# go to the root folder of the old PHP project
$ cd <path_to_project>/<project_name>
# update your old PHP project by generating all the files required for deployment
$ zend update project
# deploy the old application to the target with id = 0
$ zend deploy application -t 0
We begin by updating an existing project. As a result of this process, the 'deployment.xml' and 'deployment.properties' files are added to the project. Those files are generated automatically so they may not detect all necessary files in the case of an unexpected project structure. To ensure that the 'deployment.xml' file is generated correctly, check if a public tag is available, and has the following structure:
<public>appdir_folder/path_to_index</public>
where path_to_index is a path to the folder where index.php is located (relative to the project root), and appdir_folder is a value of appdir tag. By default, the update process checks if there is a public folder in the project root. If it is not available, then a public tag is not added (in which case you should add it manually). By default, 'deployment.properties' files add all folders from project root. To read more about the properties file, check here.
The second command is responsible for deploying the newly updated application to the target with id equals to 0.