@lando/lagoon
Version:
A Lando plugin that provides a tight integration with Lagoon.
44 lines (39 loc) • 1.02 kB
JavaScript
;
// Modules
const _ = require('lodash');
// Builder
module.exports = {
name: 'lagoon-php',
config: {
version: 'custom',
path: [
'/app/vendor/bin',
'/usr/local/sbin',
'/usr/local/bin',
'/usr/sbin',
'/usr/bin',
'/sbin',
'/bin',
'/var/www/.composer/vendor/bin',
],
confSrc: __dirname,
command: '/sbin/tini -- /lagoon/entrypoints.sh /usr/local/sbin/php-fpm -F -R',
volumes: ['/usr/local/bin'],
},
parent: '_lagoon',
builder: (parent, config) => class LandoLagoonPhp extends parent {
constructor(id, options = {}) {
options = _.merge({}, config, options);
// Build the php
const php = {
environment: _.merge({}, options.environment, {
PATH: options.path.join(':'),
}),
volumes: options.volumes,
command: options.command,
};
// Add in the php service and push downstream
super(id, options, {services: _.set({}, options.name, php)});
}
},
};