Git Product home page Git Product logo

heroku-release-phase-example's Introduction

Heroku Release Phase Sample App

This is a simple sample application designed to showcase Heroku Release Phases, a feature which allows you to automate deploy tasks right before a Heroku app is made publicly available. In this example, a static asset is uploaded to an S3 instance and said asset is referenced in one of the views with help from a S3-hosted base URL for the asset injected in via an environment variable.

The repository includes a set of static assets โ€” in this case, an image and a CSS file โ€” which, at the time of deploy, are coped into S3 (or overwritten) and then referenced in the views.

The release phase task, defined in the Procfile is a standalone, lightweight node application which uploads the assets from the public folder into S3.

Any arbitray code or shell script could be executed in this phase.

Prereqs

You will need:

  • A Heroku account
  • An Amazon S3 account w/ appropriate public read settings

Config

You'll need the following environment variables to make this work:

  • AMAZON_S3_BASE_URL - The fully-qualified S3 base URL for public access to assets stored in S3
  • AMAZON_S3_BUCKET_NAME - The bucket name for your specific S3 bucket where assets will be uploaded
  • AMAZON_S3_KEY
  • AMAZON_S3_SECRET

Heroku Button

One-Click Deploy

Thanks

Big thanks to ![Steve S.] @ Heroku for the help. Heroku Solution Engineers are legit.

heroku-release-phase-example's People

Contributors

frankcaron avatar

Watchers

 avatar  avatar  avatar

Forkers

sfdc-assets

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.