Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
add docs for buildpacks and dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Fisher committed Mar 11, 2014
1 parent 79f1bfa commit fef8241
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
74 changes: 74 additions & 0 deletions docs/developer/buildpack.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
:title: Deploying with Heroku Buildpacks on Deis
:description: A howto on deploying applications using Heroku Buildpacks
:keywords: tutorial, guide, walkthrough, howto, deis, developer, dev, buildpack, heroku

Buildpacks
==========

Buildpacks are bundles of detection and configuration scripts which set up containers to
run applications.

Deploy using Buildpacks
-----------------------

For convenience, there are a few buildpacks that are bundled with Deis:

* `Java buildpack`_
* `Ruby Buildpack`_
* `Python Buildpack`_
* `Nodejs Buildpack`_
* `Play Buildpack`_
* `PHP Buildpack`_
* `Clojure Buildpack`_
* `Golang Buildpack`_
* `Scala Buildpack`_
* `Dart Buildpack`_
* `Perl Buildpack`_

Deis will cycle through the ``bin/detect`` scripts of each buildpack to match the code you
are pushing.

Adding Custom Buildpacks
------------------------

To add a specific buildpack to your custom Deis cluster, you will need to make the change
in the `builder recipe`_ for the `Deis cookbook`_.

.. note::

Not all Heroku buildpacks work with Deis due to environmental differences (e.g.
missing libraries, Heroku-specific environment changes). Test any buildpack before
using it in production deployments.

Deploying an App with a Custom Buildpack
----------------------------------------

If you want your application to use a specific buildpack that is not included in the list,
you can set the BUILDPACK_URL environment variable for your application before your first
push. For example:

.. code-block:: console
$ deis config:set BUILDPACK_URL=https://github.com/bacongobbler/heroku-buildpack-jekyll
=== classy-hardtack
BUILDPACK_URL: https://github.com/bacongobbler/heroku-buildpack-jekyll
.. note::

Setting config variables before your first deployment results in an error. See `issue
542`_ for more details.

.. _`Java buildpack`: https://github.com/heroku/heroku-buildpack-java.git
.. _`Ruby buildpack`: https://github.com/heroku/heroku-buildpack-ruby.git
.. _`Python buildpack`: https://github.com/heroku/heroku-buildpack-python.git
.. _`Nodejs buildpack`: https://github.com/gabrtv/heroku-buildpack-nodejs
.. _`Play buildpack`: https://github.com/heroku/heroku-buildpack-play.git
.. _`PHP buildpack`: https://github.com/CHH/heroku-buildpack-php.git
.. _`Clojure buildpack`: https://github.com/heroku/heroku-buildpack-clojure.git
.. _`Golang buildpack`: https://github.com/kr/heroku-buildpack-go.git
.. _`Scala buildpack`: https://github.com/heroku/heroku-buildpack-scala.git
.. _`Dart buildpack`: https://github.com/igrigorik/heroku-buildpack-dart.git
.. _`Perl buildpack`: https://github.com/miyagawa/heroku-buildpack-perl/tree/carton
.. _`builder recipe`: https://github.com/opdemand/deis-cookbook/blob/master/recipes/builder.rb
.. _`Deis cookbook`: https://github.com/opdemand/deis-cookbook.git
.. _`issue 542`: https://github.com/opdemand/deis/issues/542
31 changes: 31 additions & 0 deletions docs/developer/dockerfile.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
:title: Deploying with Dockerfiles on Deis
:description: A howto on deploying applications using Dockerfiles
:keywords: tutorial, guide, walkthrough, howto, deis, developer, dev, docker, dockerfile

Dockerfiles
===========

A Dockerfile automates the steps you would otherwise take manually to create an image.
Deis supports Dockerfiles right out of the box, so you can run your application in your
own custom Docker image.

Deploy using Dockerfiles
------------------------

With Dockerfiles, the stack you deploy your application upon is limitless. The only
requirement is that it sets a ENV entry to set the PORT environment variable. This is so
`slugrunner`_ can listen for when the process is alive or dead. For example:

.. code-block:: console
FROM centos:latest
MAINTAINER OpDemand <info@opdemand.com>
ENV PORT 8000
ADD . /app
WORKDIR /app
CMD python -m SimpleHTTPServer $PORT
Which will serve your application's root directory on a static file server on Docker's
official CentOS image.

.. _`slugrunner`: https://github.com/deis/slugrunner
2 changes: 2 additions & 0 deletions docs/developer/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ Developer Guide
install-client
register-user
deploy-application
buildpack
dockerfile
manage-application

0 comments on commit fef8241

Please sign in to comment.