realpage/builder

There is no license information available for the latest version (v0.1.2-alpha) of this package.

Run containers for building Laravel assets (composer dependencies, npm, etc.) via php

v0.1.2-alpha 2016-04-12 17:01 UTC

This package is not auto-updated.

Last update: 2020-09-16 05:49:36 UTC


README

Containers for installing dependencies required for Laravel or Lumen projects. These containers allow us to avoid installing dependency management tooling (git, npm, composer, etc.) on the deployable containers, keeping them as lightweight as possible.

This package comes pre-installed with the Laravel Starter and Lumen Starter templates.

Installation

  1. Run composer require --dev realpage/builder

  2. Register the service provider...

For Lumen, in bootstrap/app.php:

if(class_exists('RealPage\Builder\BuilderServiceProvider')) {
    $app->register(\RealPage\Builder\BuilderServiceProvider::class);
}    

For Laravel, in config/app.php:

   \RealPage\Builder\BuilderServiceProvider::class,
  1. Add the npm and composer containers (find the latest containers on DockerHub) to your docker-compose.yml:

    version: '2'

    services: fpm: build: context: . dockerfile: infrastructure/fpm/Dockerfile image: realpage/lumen:fpm env_file: .env volumes: - ./:/var/www/html web: image: realpage/nginx:latest volumes: - ./infrastructure/nginx/vhost.conf:/etc/nginx/conf.d/default.conf ports: - "80:80" npm: image: realpage/builder:npm-3 volumes_from: - fpm composer: image: realpage/builder:composer-1 volumes_from: - fpm

Usage

Because of the compose package, instead of running docker run -i -v $(pwd):/var/www/html realpage/builder composer install you can run a simple php artisan builder:composer install.

Commands available:

$ php artisan
  builder:all         Build all of the requirements for this Laravel application
  builder:composer    Install of the composer dependencies via the builder container
  builder:npm         Install of the npm dependencies via the builder container