Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel elixir remote growling from within a docker container

Laravel elixir 6 remote notifications (Growl) from within a docker container.

In /node_modules/laravel-elixir/dist/Notification.js

Replace

var _gulpNotify = require('gulp-notify');

With

var notify = require('gulp-notify');
var nn = require('node-notifier');
var growlOptions = {
    port: 23053,
    // remote host: auto docker host IP address
    host: require('child_process').execSync("/sbin/ip route|awk '/default/ { print $3 }'", {encoding: 'utf8'} ),
    // remote host: static
    //host: '172.18.0.1',
};
var _gulpNotify = notify.withReporter(function (options, callback) {
    new nn.Growl(growlOptions).notify(options, callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment