Git Product home page Git Product logo

slug-compiler's Introduction

Slug compiler

Overview

A slug is a unit of deployment which includes everything an application needs to run. The slug compiler is a program which uses a buildpack to transform application source into a slug, typically by gathering all dependencies and compiling source to binaries, if applicable.

As inputs it takes a source directory, cache directory, buildpack URL, and output directory. It places a tarball of the slug as well as a JSON file of process types in the output directory if compilation is successful.

Note that this is a trimmed down version of the slug compiler that currently runs in production on Heroku. It's intended for next-gen services but is not currently in production use.

Usage

In the typical git-based Heroku deploy, the slug compiler is invoked via a Git pre-recieve hook. However, this code has been extracted so that the same process can be used elsewhere.

Note that it will delete .slugignore patterns and other files, so you shouldn't run this straight out of a checkout. Create a fresh copy of the application source before compiling it.

Requirements

  • Ruby 1.9
  • tar
  • du
  • git (optional, used for fetching non-HTTP buildpacks)

Responsibilities

The new slug compiler does much less than the old one. In particular, these operations are now the responsibility of the caller:

  • checking size of the slug
  • stack migration
  • detecting among set of default buildpacks
  • git submodule handling
  • special-cased bamboo operations
  • calling releases API
  • storing slug file in S3
  • deploy hooks

slug-compiler's People

Contributors

technomancy avatar

Watchers

James Cloos avatar

Forkers

michaelbearne

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.