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

How do people deal with dependencies for processes? #138

Closed
TylerBrock opened this issue Jan 24, 2017 · 4 comments
Closed

How do people deal with dependencies for processes? #138

TylerBrock opened this issue Jan 24, 2017 · 4 comments
Labels

Comments

@TylerBrock
Copy link

TylerBrock commented Jan 24, 2017

Lets say we have one Procfile entry (a) that depends on another (b) but (b) takes a long time to start. With node-foreman (a) sometimes fails because (b) isn't ready when (a) starts.

For example our web process (a) depends on the MongoDB process (b) being started.

The best thing I can think of (so far) is to add a wrapper shell script that starts (b) which sleeps for a bit before trying to start it, but this is pretty lame. What do other people do in this situation?

@nilskassube
Copy link

I would not start a database process with foreman, instead use the startup tools of your prefered Linux distribution.

It's also possibly a good idea to re-connect to a database in an error handler in your Node.js app if the connection is dropped.

@jpap
Copy link

jpap commented Sep 6, 2017

Agree with @nilskassube on production usage, however in my development environment I am using await-url to wait for webpack-dev-server to perform the first build for hot module replacement before launching electron on the build. Works well!

@TylerBrock
Copy link
Author

TylerBrock commented Sep 6, 2017

We did what @nilskassube suggested and it was a good call. Now we've moved to docker-compose which handles everything for us.

@stale
Copy link

stale bot commented Jul 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 1, 2018
@stale stale bot closed this as completed Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants