GithubHelp home page GithubHelp logo

nchan-buildpack's Introduction

nchan-buildpack

This Heroku buildpack will automatically build, configure, and run nchan for you.

Usage

This buildpack will only be triggered if your app (deployed to Heroku) contains a nchan.conf.erb file at its root. See below for configuration options. If you don't know what to configure, you can simply copy the nchan.conf.erb template.

To use the buildpack, run:

$ heroku buildpacks:add https://github.com/andjosh/nchan-buildpack.git

Configuration/Options

This buildpack currently installs Nchan v1.2.7 and Nginx v1.18.0 by default. To use a different version of Nchan, specify a tag in the heroku buildpack URL (to request a new version of Nchan be tagged, please open an issue).

# env variables available (with default) in the default nchan.conf
# set upon web server/process start
NCHAN_WORKERS=auto
NCHAN_WORKER_CONNECTIONS=1024
NCHAN_SUB_TIMEOUT=25
PORT=<set by heroku>

See configuration directives for nchan to populate your own nchan.conf.erb.

If you decide to use your own Procfile (e.g. you want to run a local auth server for nchan), be sure to also launch nchan by executing bin/boot along with your sister app. Here's an example running a node server:

web: (PORT=3000 npm start) & bin/boot

If you want nchan/nginx to wait until another app has started before booting itself, you can set the environment variable NCHAN_INITIALIZE_APP to any value. If present, nchan will wait until a file at /tmp/app-initialized exists before booting itself.

NCHAN_INITIALIZE_APP=true
# then, to finish booting nchan:
touch /tmp/app-initialized

Testing

git clone https://github.com/andjosh/nchan-buildpack.git
git clone https://github.com/heroku/heroku-buildpack-testrunner.git

Once you have both installed (and shunit2), follow the directions in the Heroku Buildpack testrunner README.

cd heroku-buildpack-testrunner
./bin/run ../nchan-buildpack

Acknowledgements

nchan-buildpack's People

Contributors

joshbeckman avatar slact avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

nchan-buildpack's Issues

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.