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

Daemonizing\Forking #28

Open
bararchy opened this issue Jul 6, 2015 · 5 comments
Open

Daemonizing\Forking #28

bararchy opened this issue Jul 6, 2015 · 5 comments

Comments

@bararchy
Copy link
Contributor

bararchy commented Jul 6, 2015

We need to add some option to "run in the background".

we can use fork

fork do
  app.serve
end

or some internal design to this this thing.

@sdogruyol
Copy link
Contributor

Why do we need this ?

@bararchy
Copy link
Contributor Author

bararchy commented Jul 6, 2015

Because unlike rails (Ruby), you cannot install a Crystal addon into apache or nginx , which means that you can only use Crystal's HTTP::Server , this in turn means that we need an option to start our programs as a service in the background without the need to relay upon VT environment and so we can initiate it via Systemd or init .

for all of those we need the bin to be able to start as a service

@sdogruyol
Copy link
Contributor

Actually we don't install any addon to apache / nginx in Ruby world.

We mostly use Nginx / Apache as a reverse proxy and static file server other than that we have Ruby web servers (Puma, Thin, Unicorn e.g) which handles the incoming requests.

@bararchy
Copy link
Contributor Author

@sdogruyol Thats cool to know, but it doesn't change the fact that we need to add a fork or app.serve_in_background option

@kbrock
Copy link

kbrock commented Sep 11, 2015

Docker and mac LaunchAgents only work if you run in the foreground.
Systemd can work either way.

I agree that this used to be the only way to run, but now a days I wonder.
What environment are you running?

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