GithubHelp home page GithubHelp logo

Comments (1)

rmg avatar rmg commented on May 29, 2024

No, the export command does not provide a proxy. The proxy functionality in node-foreman is meant to mimic the sort of services your production environment will provide when you deploy to somewhere like Heroku.

I'm not sure standing up a proxy for production use makes sense for node-foreman. Sort of shifts it from "handy dev-time tool" to "private PaaS and deployer".

If running as a non-root user is your main goal, you could set up a firewall policy to forward port 80 to the port your app is running on.

If running multiple instances of your web process is your goal, you could try one of the clustering supervisors (like strong-supervisor). You would do something like:

Procfile:

web: sl-run --cluster $WEB_COUNT server.js

.env:

WEB_COUNT=3

If you do an export with nf export, you should end up with a foreman-web-1.conf something like:

#foreman-web-1
start on starting foreman-web
stop  on stopping foreman-web
respawn

env WEB_COUNT=3
env WORKER_COUNT=3
env PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin:~/bin:/Users/ryan/.rvm/bin
env PORT=5000

export PATH

chdir /Users/ryan/work/node-foreman/demo2
setuid root
setgid root

exec sl-run --cluster $WEB_COUNT server.js >> /var/log/foreman/web-1.log 2>&1

If you go with the supervisor route, you may want to try the new upstart-single export type in the recent release. It merges the foreman-APP and foreman-APP-N jobs (assumes your app handles concurrency on its own), adds more production friendly logging, and tries to set some more production appropriate limits. You can find an example of the output here.

from node-foreman.

Related Issues (20)

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.