Skip to content

Commit

Permalink
#5000: joomla
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Dec 25, 2018
1 parent 3f212b8 commit 7455ed9
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 72 deletions.
File renamed without changes.
12 changes: 6 additions & 6 deletions examples.old/joomla/.lando.yml → examples/joomla/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: joomla
recipe: joomla

# Configure the joomla recipe
config:
# config:

# https://downloads.joomla.org/us/technical-requirements-us

Expand All @@ -19,21 +19,21 @@ config:
#
# NOTE: that this needs to be wrapped in quotes so that it is a string
#
php: '7.0'
# php: '7.0'

# Optionally specify whether you want to serve joomla via nginx or apache
#
# If ommitted this will default to the latest apache
#
# See: https://docs.joomla.org/Technical_requirements
#
via: nginx
# via: nginx

# Optionally specify the location of the webroot relative to your approot.
#
# If ommitted this will be your approot itself.
#
webroot: web
# webroot: web

# Optionally specify the database type, this can be one of:
#
Expand All @@ -45,13 +45,13 @@ config:
# a version with `type:version` but you will need to consult the documentation
# for the correct DB service to see what versions are available
#
database: mariadb:10.1
# database: mariadb:10.1

# Optionally activate xdebug
#
# If you are having trouble getting xdebug to work please see:
# https://docs.devwithlando.io/services/php.html#using-xdebug
xdebug: true
# xdebug: true

# Optionally mix in your own config files
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You should be able to run the following steps to get up and running with this ex
# Download a Joomla release into the web directory
# NOTE: Probably want to replace with the latest release
# See: https://downloads.joomla.org/us/cms/joomla3
curl -L https://downloads.joomla.org/cms/joomla3/3-8-6/Joomla_3-8-6-Stable-Full_Package.tar.gz | tar zxv -C web
curl -L https://downloads.joomla.org/us/cms/joomla3/3-9-1/joomla_3-9-1-stable-full_package-tar-gz?format=gz | tar zxv -C web

# Spin up a new laravel site
lando start
Expand Down
File renamed without changes.
7 changes: 1 addition & 6 deletions plugins/lando-recipes/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,19 @@ exports.getPhar = (url, src, dest, check = 'true') => {
* Helper to get simple lamp/lemp config defaultz
* NOTE: is it problem that this and lemp has the same class name?
*/
exports.getLampDefaults = (name = 'lamp', via = 'apache', proxyService = 'appserver') => ({
exports.getLampDefaults = (name = 'lamp', via = 'apache') => ({
name,
parent: '_lamp',
config: {
composer: {},
confSrc: __dirname,
config: {},
database: 'mysql',
php: '7.2',
services: {},
tooling: {},
via,
webroot: '.',
xdebug: false,
},
builder: (parent, config) => class LandoLamp extends parent {
constructor(id, options = {}) {
options.proxy = _.set({}, proxyService, [`${options.app}.${options._app._config.domain}`]);
super(id, _.merge({}, config, options));
};
},
Expand Down
49 changes: 0 additions & 49 deletions plugins/lando-recipes/recipes.old/joomla/joomla.js

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/lando-recipes/recipes/backdrop/default.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ server {
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root ${LANDO_WEBROOT};
root "{{LANDO_WEBROOT}}";
index index.html index.htm index.php;
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-recipes/recipes/drupal6/default.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ server {
port_in_redirect off;
client_max_body_size 100M;
root ${LANDO_WEBROOT};
root "{{LANDO_WEBROOT}}";
location = /favicon.ico {
log_not_found off;
Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-recipes/recipes/drupal8/default.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ server {
port_in_redirect off;
client_max_body_size 100M;
root ${LANDO_WEBROOT};
root "{{LANDO_WEBROOT}}";
location = /favicon.ico {
log_not_found off;
Expand Down
39 changes: 39 additions & 0 deletions plugins/lando-recipes/recipes/joomla/builder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
'use strict';

// Modules
const _ = require('lodash');

/*
* Build Drupal 7
*/
module.exports = {
name: 'joomla',
parent: '_lamp',
config: {
composer: {},
confSrc: __dirname,
config: {},
database: 'mysql',
defaultFiles: {
php: 'php.ini',
},
php: '7.2',
tooling: {joomla: {service: 'appserver'}},
via: 'apache',
webroot: '.',
xdebug: false,
},
builder: (parent, config) => class LandoJoomla extends parent {
constructor(id, options = {}) {
options = _.merge({}, config, options);
// Add the joomla cli install command
options.composer['joomlatools/console'] = '*';
// Set the default vhosts if we are nginx
if (options.via === 'nginx') config.defaultFiles.vhosts = 'default.conf.tpl';
// Set the default mysql if we are there as well
if (options.database !== 'postgres') config.defaultFiles.database = 'mysql.cnf';
// Send downstream
super(id, options);
};
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ server {
port_in_redirect off;
client_max_body_size 100M;
root ${LANDO_WEBROOT};
root "{{LANDO_WEBROOT}}";
index index.php index.html index.htm default.html default.htm;
# Support Clean (aka Search Engine Friendly) URLs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ date.timezone = "UTC"
;;;;;;;;;;;;;;;;;;;;;;

; Xdebug
xdebug.max_nesting_level = 256
xdebug.max_nesting_level = 512
xdebug.show_exception_trace = 0
xdebug.collect_params = 0

Expand Down
2 changes: 1 addition & 1 deletion plugins/lando-recipes/recipes/lemp/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const utils = require('./../../lib/utils');
/*
* Build LEMP
*/
module.exports = utils.getLampDefaults('lemp', 'nginx', 'appserver_nginx');
module.exports = utils.getLampDefaults('lemp', 'nginx');
4 changes: 0 additions & 4 deletions plugins/lando-recipes/types/drupaly/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = {
php: 'php.ini',
},
php: '7.2',
proxyService: 'appserver',
services: {appserver: {overrides: {
volumes: ['/var/www/.drush'],
}}},
Expand All @@ -53,9 +52,6 @@ module.exports = {
if (options.via === 'nginx') config.defaultFiles.vhosts = 'default.conf.tpl';
// Set the default mysql if we are there as well
if (options.database !== 'postgres') config.defaultFiles.database = 'mysql.cnf';
// Switch the proxy if needed and then set it
if (options.via === 'nginx') options.proxyService = 'appserver_nginx';
options.proxy = _.set({}, options.proxyService, [`${options.app}.${options._app._config.domain}`]);
// Send downstream
super(id, options);
};
Expand Down
4 changes: 4 additions & 0 deletions plugins/lando-recipes/types/laemp/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ module.exports = {
confSrc: __dirname,
database: 'mysql',
php: '7.2',
proxyService: 'appserver',
via: 'apache',
webroot: '.',
xdebug: false,
Expand All @@ -131,6 +132,9 @@ module.exports = {
options = _.merge({}, config, options);
options.services = _.merge({}, getServices(options), options.services);
options.tooling = _.merge({}, getTooling(options), options.tooling);
// Switch the proxy if needed and then set it
if (options.via === 'nginx') options.proxyService = 'appserver_nginx';
options.proxy = _.set({}, options.proxyService, [`${options.app}.${options._app._config.domain}`]);
super(id, options);
};
},
Expand Down

0 comments on commit 7455ed9

Please sign in to comment.