grunt-compose

0.1.0 • Public • Published

grunt-compose

Run docker-compose from Grunt

Integrate Docker Compose into your Grunt workflow. This plugin assumes that you are already using Docker Compose and have your Compose file (docker-compose.yml by default) ready. For more information about Docker Compose go here.

What this task does:

  • passes environment variables to Compose file for Bash-like $VARIABLE usage
  • runs docker-compose commands inside a target directory

Installation

npm install grunt-compose --save-dev

Configuration

In your project's Gruntfile, add a section named compose to the data object passed into grunt.initConfig().

grunt.initConfig({
    compose: {
        options: {
            cmds: ['kill', 'up'],
            cwd: 'docker',
            env: {}
        }
     }
});

Options

options.cmds

Type: Array Default value: ['up']

Array of docker-compose commands to run sequentially.

options.cwd

Type: String Default value: 'docker'

A relative directory that contains Compose file docker-compose.yml.

options.env

Type: Object Default value: {}

A set of environment variables that will be passed to yml file.

Usage

grunt compose

Package Sidebar

Install

npm i grunt-compose

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • miloss