Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly load php-nginx into the registry for inheriting plugins. #80

Merged
merged 3 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builders/php-nginx.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
5 changes: 3 additions & 2 deletions builders/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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`, {});
Expand Down
Loading