lernetz-serve-gulp-task

0.0.2 • Public • Published

lernetz-serve-gulp-task

A gulp task that starts/stops docker containers with docker-compose. It executes docker-compose up/down command within a folder. Means that docker-compose must be installed on the system.

Usage

The following example will show how to use the serve task. Simply require the task and you have the gulp tasks ready.

var gulp = require('gulp');
var serve = require( 'lernetz-serve-gulp-task' );

Now you start the tasks by run:

npx gulp ln:serve:up
npx gulp ln:serve:down

Options

The task accepts an parameter object with the following attributes:

  • folder: The path to the folder where the docker-compose files lies
  • project: The project name for docker to start. Every container will be prefixed with that project name.
var gulp = require('gulp');
var serve = require( 'lernetz-serve-gulp-task' )( { folder:"docker/folder", project:"name" } );

Custom tasks

If you like to register the tasks under another name simply us gulp.series like so:

gulp.task( 'myName', gulp.series( 'ln:serve:up' );

Package Sidebar

Install

npm i lernetz-serve-gulp-task

Weekly Downloads

0

Version

0.0.2

License

ISC

Unpacked Size

3.08 kB

Total Files

3

Last publish

Collaborators

  • lernetz-mich