Skip to content

Commit fef8241

Browse files
author
Matthew Fisher
committed
add docs for buildpacks and dockerfiles
1 parent 79f1bfa commit fef8241

3 files changed

Lines changed: 107 additions & 0 deletions

File tree

docs/developer/buildpack.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
:title: Deploying with Heroku Buildpacks on Deis
2+
:description: A howto on deploying applications using Heroku Buildpacks
3+
:keywords: tutorial, guide, walkthrough, howto, deis, developer, dev, buildpack, heroku
4+
5+
Buildpacks
6+
==========
7+
8+
Buildpacks are bundles of detection and configuration scripts which set up containers to
9+
run applications.
10+
11+
Deploy using Buildpacks
12+
-----------------------
13+
14+
For convenience, there are a few buildpacks that are bundled with Deis:
15+
16+
* `Java buildpack`_
17+
* `Ruby Buildpack`_
18+
* `Python Buildpack`_
19+
* `Nodejs Buildpack`_
20+
* `Play Buildpack`_
21+
* `PHP Buildpack`_
22+
* `Clojure Buildpack`_
23+
* `Golang Buildpack`_
24+
* `Scala Buildpack`_
25+
* `Dart Buildpack`_
26+
* `Perl Buildpack`_
27+
28+
Deis will cycle through the ``bin/detect`` scripts of each buildpack to match the code you
29+
are pushing.
30+
31+
Adding Custom Buildpacks
32+
------------------------
33+
34+
To add a specific buildpack to your custom Deis cluster, you will need to make the change
35+
in the `builder recipe`_ for the `Deis cookbook`_.
36+
37+
.. note::
38+
39+
Not all Heroku buildpacks work with Deis due to environmental differences (e.g.
40+
missing libraries, Heroku-specific environment changes). Test any buildpack before
41+
using it in production deployments.
42+
43+
Deploying an App with a Custom Buildpack
44+
----------------------------------------
45+
46+
If you want your application to use a specific buildpack that is not included in the list,
47+
you can set the BUILDPACK_URL environment variable for your application before your first
48+
push. For example:
49+
50+
.. code-block:: console
51+
52+
$ deis config:set BUILDPACK_URL=https://github.com/bacongobbler/heroku-buildpack-jekyll
53+
=== classy-hardtack
54+
BUILDPACK_URL: https://github.com/bacongobbler/heroku-buildpack-jekyll
55+
56+
.. note::
57+
58+
Setting config variables before your first deployment results in an error. See `issue
59+
542`_ for more details.
60+
61+
.. _`Java buildpack`: https://github.com/heroku/heroku-buildpack-java.git
62+
.. _`Ruby buildpack`: https://github.com/heroku/heroku-buildpack-ruby.git
63+
.. _`Python buildpack`: https://github.com/heroku/heroku-buildpack-python.git
64+
.. _`Nodejs buildpack`: https://github.com/gabrtv/heroku-buildpack-nodejs
65+
.. _`Play buildpack`: https://github.com/heroku/heroku-buildpack-play.git
66+
.. _`PHP buildpack`: https://github.com/CHH/heroku-buildpack-php.git
67+
.. _`Clojure buildpack`: https://github.com/heroku/heroku-buildpack-clojure.git
68+
.. _`Golang buildpack`: https://github.com/kr/heroku-buildpack-go.git
69+
.. _`Scala buildpack`: https://github.com/heroku/heroku-buildpack-scala.git
70+
.. _`Dart buildpack`: https://github.com/igrigorik/heroku-buildpack-dart.git
71+
.. _`Perl buildpack`: https://github.com/miyagawa/heroku-buildpack-perl/tree/carton
72+
.. _`builder recipe`: https://github.com/opdemand/deis-cookbook/blob/master/recipes/builder.rb
73+
.. _`Deis cookbook`: https://github.com/opdemand/deis-cookbook.git
74+
.. _`issue 542`: https://github.com/opdemand/deis/issues/542

docs/developer/dockerfile.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
:title: Deploying with Dockerfiles on Deis
2+
:description: A howto on deploying applications using Dockerfiles
3+
:keywords: tutorial, guide, walkthrough, howto, deis, developer, dev, docker, dockerfile
4+
5+
Dockerfiles
6+
===========
7+
8+
A Dockerfile automates the steps you would otherwise take manually to create an image.
9+
Deis supports Dockerfiles right out of the box, so you can run your application in your
10+
own custom Docker image.
11+
12+
Deploy using Dockerfiles
13+
------------------------
14+
15+
With Dockerfiles, the stack you deploy your application upon is limitless. The only
16+
requirement is that it sets a ENV entry to set the PORT environment variable. This is so
17+
`slugrunner`_ can listen for when the process is alive or dead. For example:
18+
19+
.. code-block:: console
20+
21+
FROM centos:latest
22+
MAINTAINER OpDemand <info@opdemand.com>
23+
ENV PORT 8000
24+
ADD . /app
25+
WORKDIR /app
26+
CMD python -m SimpleHTTPServer $PORT
27+
28+
Which will serve your application's root directory on a static file server on Docker's
29+
official CentOS image.
30+
31+
.. _`slugrunner`: https://github.com/deis/slugrunner

docs/developer/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ Developer Guide
1616
install-client
1717
register-user
1818
deploy-application
19+
buildpack
20+
dockerfile
1921
manage-application

0 commit comments

Comments
 (0)