Giter VIP home page Giter VIP logo

php-stack's Introduction

What's this

The purpose of this project is to build a set of PHP environments as Docker images.

Stack

  • PHP Base: Based on the PHP binaries of Bref, install composer, and a production-ready ini config file
  • PHP Extensions: Based on PHP Base, builds a list of extensions that can be easily included
  • PHP Nginx: Based on PHP Base, install and configure Nginx
  • PHP API: Based on PHP Nginx, prepare some downstream triggers for a fully functional API project
  • PHP Web: Based on PHP Nginx, prepare some downstream triggers for a fully functional Web project

PHP Base

Available as gbmcarlos/php-base.

Uses Bref's development FPM image, because it contains the appropiate SAPIs, and it contains Xdebug.

  • Installs git and zip, which are required by Composer.
  • Removes Bref's ini file, and copies the production-ready ini file from the official Docker image of PHP
  • Installs Composer from their official Docker image.

PHP Extensions

Available as gbmcarlos/php-ext-{extensions-name}.

Uses PHP Base as base image.

For each extension:

  • Download the source code
  • Build the extension
  • Isolate it in a scratch image

An extension can be included with

COPY --from=gbmcarlos/php-ext-{extension-name} /opt /opt

Extensions:

PHP Nginx

Available as gbmcarlos/php-nginx.

Uses PHP Base as base image.

  • Installs Nginx.
  • Configures Nginx permissions.
  • Installs an init file to keep Nginx and PHP-FPM running

PHP API

Available as gbmcarlos/php-api.

Uses PHP Nginx as base image.

  • Registers downstream triggers (instructions that will be executed when this image is used a base image, in the child image's context) to:
    • copy the Composer files (composer.*)
    • install the Composer dependencies
    • copy the source code (src folder)
    • dump the Composer autoloader
    • copy the config files (PHP's ini, PHP-FPM's ini, and Nginx)

PHP Web

Available as gbmcarlos/php-web.

Uses PHP Nginx as base image.

  • Installs NodeJS
  • Registers downstream triggers (instructions that will be executed when this image is used a base image, in the child image's context) to:
    • copy the NPM files (package*)
    • install the NPM dependencies
    • copy the Composer files (composer.*)
    • install the Composer dependencies
    • copy the source code (src folder)
    • compile the Webpack assets
    • dump the Composer autoloader
    • copy the config files (PHP's ini, PHP-FPM's ini, and Nginx)

php-stack's People

Contributors

gbmcarlos avatar

Stargazers

Pmoranga avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.