Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom port #21

Open
ewindso opened this issue Jan 29, 2015 · 2 comments
Open

Custom port #21

ewindso opened this issue Jan 29, 2015 · 2 comments

Comments

@ewindso
Copy link

ewindso commented Jan 29, 2015

Hello @jordansissel -- how do I specify a custom port (not the default Heroku port)? I need to do this in order to mix it with the nginx build pack... thanks!

@wfleming
Copy link
Collaborator

wfleming commented Feb 9, 2015

I think you could use a Procfile like the following:

web: bin/start-nginx -f PORT="/tmp/nginx.socket" node build/bundle/main.js

The -f is since Meteor isn't going to touch /tmp/app-initialized by default: you might want to add code to your Meteor app to do that on Meteor.startup() so you don't need to use the -f.

If the socket to listen on doesn't get set properly that way, you would probably need to use an additional buildpack custom-made to create a shell script for you that would export PORT="/tmp/nginx.socket" before running node build/bundle/main.js. The reason I think you'd need to do it in another buildpack is that no shell script in your repo will get carried through Meteor's build phase.

@hydrotik
Copy link

hydrotik commented Oct 8, 2016

Hi @ewindso, were you able to get this setup? I came across this and would love to see if you got it working?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants