Socket
Socket
Sign inDemoInstall

dokku-gulp-tasks

Package Overview
Dependencies
222
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dokku-gulp-tasks

A few opinionated gulp.js tasks for speeding-up deployment with Dokku.


Version published
Maintainers
1
Install size
5.20 MB
Created

Readme

Source

Dokku gulp tasks

A few opinionated gulp.js tasks for speeding-up deployment with Dokku.

These tasks assume the following about your environment:

  • Your application uses MySQL
  • You're running Dokku v0.4.14 or later, and using the official MySQL plugin
  • You have SSH keys set up for the dokku user
  • You're running in a Vagrant machine, with the root of your application shared at /vagrant
  • You have an existing gulpfile.babel.js

Getting started

  1. Install the package to your project with npm install --save dokku-gulp-tasks
  2. Require the package in your gulpfile.js, and pass it an instance of gulp:
// ES2015-style
import deployTasks from 'dokku-gulp-tasks';
deployTasks(gulp);

// CommonJS-style
require('dokku-gulp-tasks')(gulp);
  1. Create a env.json (see example) in the root of your project to describe the local database credentials, and remote Dokku server(s).

You can override the shared directory with the sharedDirectory parameter:

// env.json
{
  "sharedDirectory": "/home/vagrant"
}

You can force the scripts to expect to be run in the context of a Vagrant machine (versus the host machine) by setting isVagrantContext:

// env.json
{
  "isVagrantContext": true
}

By default, the script will check if the user who invoked it matches vagrant to determine the context.

Usage

gulp dokku [--command <command>] [--env <env>]

Deployment

The dokku task allows you to run arbitrary Dokku commands, specified in the command argument (for example, gulp dokku apps will list the apps deployed to the server). If you have multiple Dokku servers specified in env.json, you can specify an environment by key with the env argument.

gulp dokku:init [--env <env>]

Readies the Dokku server for deployment of the app by performing the following tasks:

  • Creates a new app
  • Creates a MySQL container
  • Links the app and MySQL containers
gulp dokku:remote [--env <env>]

Creates a git remote for the Dokku server. This task is run automatically by dokku:init, but is useful for adding a remote for an app that was initialized by another developer.

gulp dokku:deploy [--env <env>]

Deploys the application by pushing the current branch to the Dokku server.

Databases

gulp db:dump-local [--env <env>]

Dumps the database from the local Vagrant machine to the .tmp directory.

gulp db:dump-remote [--env <env>] [--mariadb]

Dumps the database of the remote Dokku app to the .tmp directory. The mariadb flag provides legacy support for Kloadut's Dokku MariaDB plugin.

gulp db:push [--env <env>] [--mariadb]

Pushes the database from the local Vagrant machine to a remote Dokku app.

gulp db:pull [--env <env>] [--mariadb]

Pulls the database of the remote Dokku app to the local Vagrant machine.

gulp db:backup [--env <env>] [--mariadb]

Creates timestamped dumps of the databases from both the local Vagrant machine, and the remote Dokku app to the /databases directory.

FAQs

Last updated on 22 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc