Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

launchkit

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

launchkit

Deploy with ease

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

LaunchKit

This command line utility is useful for providing interface for deploying to various providers (currently only supports Zeit.co's Now).

Usage

Install

using Yarn
$ yarn global add launchkit
using NPM
$ npm i -g launchkit
See detailed usage instructions
$ launchkit -h

Deploy

Intended usage is to create a launchkit.yml in the root of your project's repository using the syntax described below and encrypt using a secret stored in .key file.

ProjectRoot/.key
Your secret token phrase
ProjectRoot/launchkit.yml
default:
  deployer: now
  options:
    alias: dev.example.com
    token: [your Now API token]
    vars: 
      NODE_ENV: development
production:
  options:
    alias: example.com
Encrypt

This encrypts the file so you can keep it in version control like .git repository and keep different configurations for different branches/features you work on. The only thing you then need to share with your team is the .key file.

$ launchkit encrypt launchkit.yml
Update config var
$ launchkit update production options.vars.NODE_ENV=production
View current config
$ launchkit view
default:
  deployer: now
  options:
    alias: dev.example.com
    token: [your Now API token]
    vars: 
      NODE_ENV: development
production:
  options:
    alias: example.com
    vars:
      NODE_ENV: production

Config

// The general schema of the file should look like this
// Note that any config is deeply merged with "default" if present
MainConfig {
  [envName]: EnvConfig,
  default: EnvConfig,
}

// Individual configs for each branch
EnvConfig {
  deployer: string,
  protected: boolean,
  options: DeployerOptions,
}

DeployerOptions {
  // ...any data that the provider might need to deploy
}

// Only the "now" provider is currently supported:
NowDeployerOptions {
  token: string
  // Aliasing pattern using Mustache, see example below. Can also be a list
  // of strings if you need to alias to multiple URLs.
  alias: string
  vars: {
    [TARGET_ENV_VAR]: ""
  }
}

Example Complete Config File Using the Now Deployer

You can include environment variables in the configuration (options.alias and options.vars) using handlebars. This feature is currently only available for the Now deployer.

default:
  deployer: now
  options:
    alias: '{{PROJECT_REPONAME}}-{{BRANCH}}.example.com'
    token: XxMTU7FBlszCFkMnzsAGhnho
    vars:
      CAREERS_SITE: 'https://careers-site-dev.example.com'
      DATA_SERVICE: 'https://data-service-dev.example.com'
      PUBLIC_API: 'https://public-api-{{ENVIRONMENT}}.example.com'
dev:
  options:
    alias: '{{PROJECT_REPONAME}}-dev.example.com'
    vars:
      CAREERS_SITE: 'https://careers-site.example.com'
      DATA_SERVICE: 'https://data-service.example.com'
      PUBLIC_API: 'https://public-api.example.com'
      SUPER_SECRET_TOKEN: beep
production:
  options:
    alias:
      - 'www.example.com'
      - 'example.com'
    vars:
      CAREERS_SITE: 'https://careers-site.example.com'
      DATA_SERVICE: 'https://data-service.example.com'
      PUBLIC_API: 'https://public-api.example.com'
      SUPER_SECRET_TOKEN: foo

FAQs

Package last updated on 09 Nov 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc