PageRenderTime 27ms CodeModel.GetById 1ms RepoModel.GetById 1ms app.codeStats 0ms

/php-zendserver/content.md

https://gitlab.com/apachipa/docs
Markdown | 134 lines | 73 code | 61 blank | 0 comment | 0 complexity | 419c953612c4271fa93f46971f6fed6d MD5 | raw file
  1. # What is Zend Server?
  2. Zend Server is the integrated application platform for PHP mobile and web apps. Zend Server provides you with a highly available PHP production environment which includes, amongst other features, a highly reliable PHP stack, application monitoring, troubleshooting, and the all-new Z-Ray.
  3. ### Boost your Development with Z-Ray
  4. Using Zend Server Z-Ray is akin to wearing X-Ray goggles, effortlessly giving developers deep insight into how their code is running as they are developing it all without having to change any of their habits or workflow. With Z-Ray, developers can immediately understand the impact of their code changes, enabling them to both improve quality and solve issues long before their code reaches production. In addition to the obvious benefits of this Left Shifting better performance, fewer production issues and faster recovery times using Z-Ray is also downright fun!
  5. ### Powering Continuous Delivery
  6. Zend Server is the platform that enables Continuous Delivery, which provides consistency, automation and collaboration capabilities throughout the application delivery cycle. Patterns are available to integrate Zend Server with: Chef, Jenkins, Nagios, Vmware, Puppet.
  7. ### Additional Resources
  8. - [http://www.zend.com/](http://www.zend.com/)
  9. - [http://kb.zend.com/](http://kb.zend.com/)
  10. - [http://files.zend.com/help/Zend-Server/zend-server.htm#faqs.htm](http://files.zend.com/help/Zend-Server/zend-server.htm#faqs.htm)
  11. - [http://files.zend.com/help/Zend-Server/zend-server.htm#getting\_started.htm](http://files.zend.com/help/Zend-Server/zend-server.htm#getting_started.htm)
  12. # PHP-ZendServer
  13. This is a cluster-enabled version of a Dockerized Zend Server 8.0 container. With Zend Server on Docker, you'll get your PHP applications up and running on a highly available PHP production environment which includes, amongst other features, a highly reliable PHP stack, application monitoring, troubleshooting, and the new and innovative new technology - Z-Ray. Z-Ray gives developers unprecedented visibility into their code by tracking and displaying in a toolbar live and detailed info on how the various elements constructing their page are performing.
  14. For development purposes we provide you with a trial license that is valid until July-31st-2016. For production use you must provide a valid Zend Server license using the instructions below in the Usage section.
  15. ## Usage
  16. #### Launching the Container from Docker-Hub
  17. Zend Server is shared on [Docker-Hub] as **php-zendserver**.
  18. ##### Single instance
  19. To start a single Zend Server instance, execute:
  20. $ docker run php-zendserver
  21. - You can specify the PHP and Zend Server version by adding ':<php-version>' or ':&lt;ZS-version&gt;-php&lt;version&gt;' to the 'docker run' command.
  22. for example:
  23. $docker run php-zendserver:8.0-php5.6
  24. #### Availible versions:
  25. - Zend Server 7
  26. - Zend Server 8
  27. - Zend Server 9 (With PHP 7 GA)(Default version)
  28. ##### Cluster
  29. To start a Zend Server cluster, execute the following command for each cluster node:
  30. $ docker run -e MYSQL_HOSTNAME=<db-ip> -e MYSQL_PORT=3306 -e MYSQL_USERNAME=<username> -e MYSQL_PASSWORD=<password> -e MYSQL_DBNAME=zend php-zendserver
  31. #### Bring your own license
  32. To use your own Zend Server license: $ docker run php-zendserver -e ZEND_LICENSE_KEY=<license-key> -e ZEND_LICENSE_ORDER=<order-number>
  33. #### Launching the Container from Dockerfile
  34. From a local folder containing this repo's clone, execute the following command to generate the image. The **image-id** will be outputted:
  35. $ docker build .
  36. ##### Single instance from custom image
  37. To start a single Zend Server instance, execute:
  38. $ docker run <image-id>
  39. #### Cluster from custom image
  40. To start a Zend Server cluster, execute the following command on each cluster node:
  41. $ docker run -e MYSQL_HOSTNAME=<db-ip> -e MYSQL_PORT=3306 -e MYSQL_USERNAME=<username> -e MYSQL_PASSWORD=<password> -e MYSQL_DBNAME=zend <image-id>
  42. #### Accessing Zend server
  43. Once started, the container will output the information required to access the PHP application and the Zend Server UI, including an automatically generated admin password.
  44. #### Port forwarding (For remote access)
  45. To access the container **remotely**, port forwarding must be configured, either manually or using docker. For example, this command redirects port 80 to port 88, and port 10081 (Zend Server UI port) to port 10088:
  46. $ docker run -p 88:80 -p 10088:10081 php-zendserver
  47. ##### For clustered instances:
  48. To start a Zend Server cluster you must provide a Mysql compatible database:
  49. $ docker run -p 88:80 -p 10088:10081 -e MYSQL_HOSTNAME=<db-ip> -e MYSQL_PORT=3306 -e MYSQL_USERNAME=<username> -e MYSQL_PASSWORD=<password> -e MYSQL_DBNAME=zend <image-id>
  50. Please note, when running multiple instances only one instance can be bound to a port. If you are running a cluster, either assign a port redirect to one node only, or assign a different port to each container.
  51. #### Adding application files
  52. Application files can be automatically pulled from a Git repo by setting the **GIT_URL** env var to the repo's URL. Alternatively, if building an image from Dockerfile, place the app files in the "app/" folder.
  53. The files will be copied to the containers /var/www/html folder and defined in Zend Server as the default app. An example index.html file is included. this feature is available in Zend Server 8 and above.
  54. #### Env variables
  55. Env variables are passed in the run command with the "-e" switch.
  56. ##### Optional env-variables:
  57. To specify a pre-defined admin password for Zend Server use:
  58. - ZS\_ADMIN\_PASSWORD
  59. Automatically Deploy an app from Git URL:
  60. - GIT\_URL
  61. MySQL vars for clustered ops. *ALL* are required for the node to properly join a cluster:
  62. - MYSQL\_HOSTNAME - ip or hostname of MySQL database
  63. - MYSQL\_PORT - MySQL listening port
  64. - MYSQL\_USERNAME
  65. - MYSQL\_PASSWORD
  66. - MYSQL\_DBNAME - Name of the database Zend Server will use for cluster ops (created automatically if it does not exist).
  67. To specify a pre-purchased license use the following env vars:
  68. - ZEND\_LICENSE\_KEY
  69. - ZEND\_LICENSE\_ORDER
  70. Set Zend Server to production mode by setting the following env var to "true". By default Zend Server is set to "development mode" with Z-Ray enabled:
  71. - ZS\_PRODUCTION
  72. ### Minimal Requirements
  73. Each Zend Server Docker container requires 1GB of availible memory.