Giter Site home page Giter Site logo

Run on startup about foreman HOT 9 CLOSED

travisp avatar travisp commented on June 4, 2024
Run on startup

from foreman.

Comments (9)

ddollar avatar ddollar commented on June 4, 2024

I'm still trying to decide how to allow customization of the resulting upstart scripts without adding a crazy amount of command line options. Do you have any ideas?

from foreman.

travisp avatar travisp commented on June 4, 2024

If you don't want to make something like this a built in command line option, maybe some way to specify or automatically read and insert certain command line options into the upstart templates would work. Maybe something like:

Automatically read from config/foreman/master.conf.erb (or specify an upstart template directory)

  1. the gem's data/export/upstart/master.conf.erb could import the contents of this file at the top or bottom...
    or
  2. or this file could be used instead of what is in the gem's master.conf.erb. these files could also be generated by foreman as a rake generate task, to create the template for the user if they want to customize it.

I'm not sure if there's an easier or cleaner approach, but these would allow customization without adding tons of command line options.

from foreman.

mrrooijen avatar mrrooijen commented on June 4, 2024

@ddollar @travisp I didn't see this issue and already set up a pull request. I found myself updating the /etc/init/<app>.conf every time by adding a single line at the top that'll start up my processes when the system boots up. It would be nice if you could just do foreman export upstart /etc/init --start-on-boot (or -b) that'll automatically add the line so you don't have to edit the file manually every time.

Here's the pull request: #36

from foreman.

rstacruz avatar rstacruz commented on June 4, 2024

+1

from foreman.

ddollar avatar ddollar commented on June 4, 2024

This can now be achieved with custom export templates. Closing this issue.

from foreman.

asanghi avatar asanghi commented on June 4, 2024

@ddollar just thinking that start on boot is actually a great default (as a user i'm less concerned about cli option proliferation than you). Perhaps there is a cool justification for why this should NOT be the default that i'm missing or maybe i'm assuming too much about the kind of processes being managed by foreman. At the risk of being overly dramatic, runlevel is a fundamental property of upstart/inittab and what not, no?

Exporting and keeping another set of templates negates at least one major purpose of foreman IMHO (exporting). If the /etc/init/*.conf files are generated out of my own possibly error prone and non-standard templates, what do i need foreman (outside of development) for? Am I missing something here?

I loved the fact that you had taken away the pain from us of configuring "upstarting" of processes and abstracted it in the Procfile to a large extent. With having to maintain my own templates, this feature gets diluted.

If i've overlooked something, i'm quite happy to get convinced either way.

from foreman.

jgonera avatar jgonera commented on June 4, 2024

I agree with @asanghi

from foreman.

clumsysnake avatar clumsysnake commented on June 4, 2024

3rd'ed. I'm a bit confused, wouldnt you want your app to start up on boot?

from foreman.

asanghi avatar asanghi commented on June 4, 2024

Good!! Looks like the merge for #229 has fixed this. Your app should now start/stop fairly easily!

from 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.