Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP ALL THE BOXEN
Puppet Ruby Shell
branch: master

This branch is 1 commit ahead, 300 commits behind mattheath:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
files
lib/puppet
manifests
script
templates
.gitignore
Gemfile
Gemfile.lock
README.md

README.md

PHP Puppet Module for Boxen

Requires the following boxen modules:

  • boxen
  • homebrew
  • wget
  • autoconf
  • libtool

Usage

# Install php 5.4
require php::5-4

# Install a couple of specific minor versions
require php::5-3-17
require php::5-4-11

# Install a php version and set as the global default php
class { 'php::global':
  version => '5.4.10'
}

# Ensure a specific php version is used within a directory
php::local { '/path/to/my/awesome/project':
  version => '5.4.9'
}

# Ensure an extension is installed for a certain php version
# note, you can't have duplicate resource names so you have to name like so
php::extension::apc { "apc for ${version}":
  php     => $version,
  version => '3.1.13', # Optionally specify the extension version
}

# Set up PHP-FPM as a service running a specific version of PHP
include php::fpm::5-3-15

# Run multiple PHP-FPM services
include php::fpm::5-4-11
include php::fpm::5-3-21

# Spin up a PHP-FPM pool for a project
# Ensures:
#  * the version of PHP is installed
#  * a PHP-FPM service is configured for this PHP version
#  * a FPM pool is listening on a per project nginx socket
$name = "project-name"
$version = "5.4.10"
php::fpm::pool { "${name}-${version}":
  version => ${version},
  socket  => "${boxen::config::socketdir}/${name}",
  require => File["${nginx::config::sitesdir}/${name}.conf"],
}
Something went wrong with that request. Please try again.