MVC Skeleton Application

If you want to use zend-mvc to build Model-View-Controller (MVC) applications, we recommend you start with our skeleton application.

This skeleton includes a Vagrantfile based on Ubuntu 14.04, and using the ondrej/php PPA to provide PHP 7.0. Start it up using: $ vagrant up. Once built, you can also run composer within the box. For example, the following will install dependencies: $ vagrant ssh -c 'composer install' While this will update them: $ vagrant ssh -c 'composer update'. Install php calendar extension. 1 - Open the.env file 2 - Search for the PHPFPMINSTALLCALENDAR argument under the PHP-FPM container 3 - Set it to true 4 - Re-build the containers docker-compose build php-fpm. Install libfaketime in php-fpm. Libfaketime allows you to control the date and time that is returned from the operating system. In short, it is a script provided by the official PHP Docker image that you can use to easily install extensions. For more information read the documentation. Now that we created the script that contains all prerequisites for our build environment, let’s add it in.gitlab-ci.yml. GRPC is a modern, open-source, high-performance remote procedure call framework. If you want to use PHP client libraries for gRPC-enabled APIs, you must install gRPC for PHP. This tutorial explains how to install and enable gRPC. Install the gRPC extension for PHP. Enable the gRPC extension for PHP. PHP 7.0 or later.

Installation using Composer

The easiest way to create a new Zend Framework project is to use Composer. If you don't have it already installed, then please install it per their documentation.

Docker Install Composer Php Ubuntu

To create your new Zend Framework project:

Once installed, you can test it out immediately using PHP's built-in web server:

This will start the PHP cli-server on port 8080, and bind it to all network interfaces.

Docker install composer php pluginPhp

Note: The built-in CLI server is for development only.

Using Vagrant

This skeleton includes a Vagrantfile based on Ubuntu 14.04, and using the ondrej/php PPA to provide PHP 7.0. Start it up using:

Once built, you can also run composer within the box. For example, the following will install dependencies:

While this will update them:

While running, Vagrant maps your host port 8080 to port 80 on the virtual machine; you can visit the site at http://localhost:8080/

Docker

Using docker-compose

Docker

Docker Php Alpine Install Composer

The skeleton also provides a docker-compose.yml for use with docker-compose; it uses the Dockerfile provided as its base. Build and start the image using:

At this point, you can visit http://localhost:8080 to see the site running.

You can also run composer from the image. The container environment is named 'zf', so you will pass that value to docker-compose run: