Comments (1)
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)
- Using .env parameters inside Procfile HOT 2
- How to handle nf run child process options HOT 2
- Regex DoS (ReDos) Vulnerability [FIXED] HOT 14
- Handling release entry in procfile HOT 7
- npm reported sever vulnerability in nf HOT 1
- Profile parsing fails if tuple is not set or has no items HOT 1
- Redis exits with code 1 or null, node-foreman does not appear to wait as foreman does HOT 1
- Spuriously escapes some characters on windows HOT 1
- library usage of `node-foreman`? HOT 1
- Error when starting foreman: Cannot read property '1' HOT 3
- Sequential tasks HOT 3
- How to use different shell to /bin/sh HOT 4
- all processes are killed if one process exits HOT 5
- Processes don't always exit on Ctrl-C (SIGINT)
- How to run nf run 'node --expose-gc' app.js
- .env parsing does not allow for BASH references like other dotenv implementations
- Mac now defaults to using port 5000
- Disable Logging or log levels
- Command-line option to disable automatic PORT assignment
- `nf` claims to have delivered `SIGINT` to all children on exit from one, but does not actually HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-foreman.