Skip to content

Commit

Permalink
#763 #1460: WARPFACTOR3
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Feb 21, 2019
1 parent 79a2062 commit 556c850
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
3 changes: 0 additions & 3 deletions plugins/lando-services/services/php/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ module.exports = {
options = parseConfig(_.merge({}, config, options));
// Mount our default php config
options.volumes.push(`${options.confDest}/${options.defaultFiles._php}:${options.remoteFiles._php}`);
// options.volumes.push(`${options._app.root}:/app:delegated`);
// options.volumes.push('exclude_vendor:/app/vendor');
// options.volumes.push('exclude_core:/app/core');

// Shift on the docker entrypoint if this is a more recent version
// @TODO: can we assume we will always have major.minor for php release?
Expand Down
25 changes: 6 additions & 19 deletions plugins/lando-sharing/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Modules
const _ = require('lodash');
const path = require('path');
const toObject = require('./../../lib/utils').toObject;
const utils = require('./lib/utils');

// Helper to make excludes unique
Expand Down Expand Up @@ -33,7 +34,7 @@ module.exports = (app, lando) => {
const mountDir = path.join(lando.config.userConfRoot, 'mounter', app.name);
const mountFiles = lando.utils.dumpComposeData(mountData, mountDir);
return lando.engine.run({
compose: _.flatten([app.compose, mountFiles]),
compose: mountFiles,
project: app.project,
cmd: getPopCommand(excludes),
opts: {
Expand All @@ -48,26 +49,12 @@ module.exports = (app, lando) => {

// Sharing is caring
app.events.on('post-init', () => {
// Add the top level volumes
app.add(new app.ComposeService('excludes-volumes', {}, {
app.add(new app.ComposeService('excludes', {}, {
volumes: utils.getNamedVolumes(excludes),
services: toObject(app.services, {
volumes: utils.getServiceVolumes(excludes, '/app'),
}),
}));
// Drill down into each service and modify the volumes
// @NOTE: for some reason this is necessary and we cant do the same thing
// we are doing above, seems like the nested /app volumes need to be declared in teh same place
// and early on
/*
_.forEach(app.composeData, service => {
if (_.includes(app.services, service.id) && _.has(service.data[0], `services.${service.id}.volumes`)) {
// Re-add the host mounted /app
service.data[0].services[service.id].volumes.push(`${app.root}:/app:delegated`);
// Add the named volumes
_.forEach(utils.getServiceVolumes(excludes, '/app'), volume => {
service.data[0].services[service.id].volumes.push(volume);
});
}
})
*/
});
}
};

0 comments on commit 556c850

Please sign in to comment.