UNPKG

app.json

Version:

Create, validate, and render Heroku app.json manifests

123 lines (122 loc) 5.91 kB
<p><code>app.json</code> is a manifest format for describing web apps. It declares environment variables, addons, and other information required to run an app on Heroku. This document describes the schema in detail.</p> <h2 id="example-app-json">Example app.json</h2> <pre><code class="lang-json">{ &quot;name&quot;: &quot;Small Sharp Tool&quot;, &quot;description&quot;: &quot;This app does one little thing, and does it well.&quot;, &quot;keywords&quot;: [ &quot;productivity&quot;, &quot;HTML5&quot;, &quot;scalpel&quot; ], &quot;website&quot;: &quot;https://small-sharp-tool.com/&quot;, &quot;repository&quot;: &quot;https://github.com/jane-doe/small-sharp-tool&quot;, &quot;logo&quot;: &quot;https://small-sharp-tool.com/logo.svg&quot;, &quot;success_url&quot;: &quot;/welcome&quot;, &quot;scripts&quot;: { &quot;postdeploy&quot;: &quot;bundle exec rake bootstrap&quot; }, &quot;env&quot;: { &quot;BUILDPACK_URL&quot;: &quot;https://github.com/stomita/heroku-buildpack-phantomjs&quot;, &quot;SECRET_TOKEN&quot;: { &quot;description&quot;: &quot;A secret key for verifying the integrity of signed cookies.&quot;, &quot;generator&quot;: &quot;secret&quot; }, &quot;WEB_CONCURRENCY&quot;: { &quot;description&quot;: &quot;The number of processes to run.&quot;, &quot;value&quot;: &quot;5&quot; } }, &quot;addons&quot;: [ &quot;openredis&quot;, &quot;mongolab:shared-single-small&quot; ] } </code></pre> <h2 id="schema-reference">Schema Reference</h2> <h3 id="name">name</h3> <p><em>(string, optional)</em> A clean and simple name to identify the template (30 characters max).</p> <pre><code class="lang-json">{ &quot;name&quot;: &quot;Small Sharp Tool&quot; } </code></pre> <h3 id="description">description</h3> <p><em>(string, optional)</em> A brief summary of the app: what it does, who it&#39;s for, why it exists, etc.</p> <pre><code class="lang-json">{ &quot;description&quot;: &quot;This app does one little thing, and does it well.&quot; } </code></pre> <h3 id="keywords">keywords</h3> <p><em>(array, optional)</em> An array of strings describing the app.</p> <pre><code class="lang-json">{ &quot;keywords&quot;: [ &quot;productivity&quot;, &quot;HTML5&quot;, &quot;scalpel&quot; ] } </code></pre> <h3 id="website">website</h3> <p><em>(string, optional)</em> The project&#39;s website.</p> <pre><code class="lang-json">{ &quot;website&quot;: &quot;https://small-sharp-tool.com/&quot; } </code></pre> <h3 id="repository">repository</h3> <p><em>(string, optional)</em> The location of the application&#39;s source code, such as a Git URL, GitHub URL, Subversion URL, or Mercurial URL.</p> <pre><code class="lang-json">{ &quot;repository&quot;: &quot;https://github.com/jane-doe/small-sharp-tool&quot; } </code></pre> <h3 id="logo">logo</h3> <p><em>(string, optional)</em> The URL of the application&#39;s logo image. Dimensions should be square. Format can be SVG, PNG, or JPG.</p> <pre><code class="lang-json">{ &quot;logo&quot;: &quot;https://small-sharp-tool.com/logo.svg&quot; } </code></pre> <h3 id="success_url">success_url</h3> <p><em>(string, optional)</em> A URL specifying where to redirect the user once their new app is deployed. If value is a fully-qualified URL, the user should be redirected to that URL. If value begins with a slash <code>/</code>, the user should be redirected to that path in their newly deployed app.</p> <pre><code class="lang-json">{ &quot;success_url&quot;: &quot;/welcome&quot; } </code></pre> <h3 id="scripts">scripts</h3> <p><em>(object, optional)</em> A key-value object specifying scripts or shell commands to execute at different stages in the build/release process. Currently, <code>postdeploy</code> is the only supported script.</p> <pre><code class="lang-json">{ &quot;scripts&quot;: { &quot;postdeploy&quot;: &quot;bundle exec rake bootstrap&quot; } } </code></pre> <h3 id="env">env</h3> <p><em>(object, optional)</em> A key-value object for environment variables, or <a href="https://devcenter.heroku.com/articles/config-vars">config vars</a> in Heroku parlance. Keys are the names of the environment variables. Values can be strings or objects. If the value is a string, it will be used. If the value is an object, it defines specific requirements for that variable:</p> <ul> <li><code>description</code>: a human-friendly blurb about what the value is for and how to determine what it should be</li> <li><code>value</code>: a default value to use. This should always be a string.</li> <li><code>required</code>: A boolean indicating whether the given value is required for the app to function (default: <code>true</code>).</li> <li><code>generator</code>: a string representing a function to call to generate the value. Currently the only supported generator is <code>secret</code>, which generates a pseudo-random string of characters.</li> </ul> <pre><code class="lang-json">{ &quot;env&quot;: { &quot;BUILDPACK_URL&quot;: &quot;https://github.com/stomita/heroku-buildpack-phantomjs&quot;, &quot;SECRET_TOKEN&quot;: { &quot;description&quot;: &quot;A secret key for verifying the integrity of signed cookies.&quot;, &quot;generator&quot;: &quot;secret&quot; }, &quot;WEB_CONCURRENCY&quot;: { &quot;description&quot;: &quot;The number of processes to run.&quot;, &quot;value&quot;: &quot;5&quot; } } } </code></pre> <h3 id="addons">addons</h3> <p><em>(array, optional)</em> An array of strings specifying Heroku addons to provision on the app before deploying. Each addon should be in the format <code>addon:plan</code> or <code>addon</code>. If plan is omitted, that addon&#39;s default plan will be provisioned.</p> <pre><code class="lang-json">{ &quot;addons&quot;: [ &quot;openredis&quot;, &quot;mongolab:shared-single-small&quot; ] } </code></pre>