Skip to content

Instantly share code, notes, and snippets.

@bonsi
Last active December 2, 2016 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bonsi/15fb77dc73515b87ee198e1d34ec31d2 to your computer and use it in GitHub Desktop.
Save bonsi/15fb77dc73515b87ee198e1d34ec31d2 to your computer and use it in GitHub Desktop.
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