diff --git a/builders/php-nginx.js b/builders/php-nginx.js index 6968c11..7237c85 100644 --- a/builders/php-nginx.js +++ b/builders/php-nginx.js @@ -1,7 +1,7 @@ 'use strict'; const _ = require('lodash'); -const LandoNginx = require('./../node_modules/@lando/nginx/builders/nginx.js'); +const LandoNginx = require('@lando/nginx/builders/nginx.js'); // Builder module.exports = { diff --git a/builders/php.js b/builders/php.js index e02b6ef..ab3d204 100644 --- a/builders/php.js +++ b/builders/php.js @@ -21,7 +21,7 @@ const nginxConfig = options => ({ project: options.project, root: options.root, ssl: options.nginxSsl, - type: 'php-nginx', + type: options.nginxServiceType, userConfRoot: options.userConfRoot, webroot: options.webroot, version: options.via.split(':')[1], @@ -132,6 +132,7 @@ module.exports = { via: 'apache', volumes: ['/usr/local/bin'], webroot: '.', + nginxServiceType: 'php-nginx', }, parent: '_appserver', builder: (parent, config) => class LandoPhp extends parent { @@ -192,7 +193,7 @@ module.exports = { const nginxOpts = nginxConfig(options); // Merge in any user specifified - const PhpNginx = factory.get('php-nginx'); + const PhpNginx = factory.get(nginxOpts.type); const data = new PhpNginx(nginxOpts.name, nginxOpts); // If the user has overriden this service lets make sure we include that as well const userOverrides = _.get(options, `_app.config.services.${nginxOpts.name}.overrides`, {});