GithubHelp home page GithubHelp logo

Comments (7)

groundwater avatar groundwater commented on May 24, 2024

Hey, so just to clarify you wanted to be able to set the location of the logs for the upstart job?

I can probably to that in the next few days. I agree, feature parity would be nice.

from node-foreman.

Iristyle avatar Iristyle commented on May 24, 2024

Yup, upstart log location, rather than hard-coded /var/log/.

I usually prefer /var/log because this is the standard log location, but for whatever reason, Capistrano likes to create an #{app_dir}/shared/log directory and output there.

Not sure which convention I should break ;0 But parity is a good thing in any event, as noted.

Thanks!

from node-foreman.

groundwater avatar groundwater commented on May 24, 2024

This will also include a command by root creating and chown'ing the directory to whatever the given node user is. Would this work with Capistrano? I don't see any reason why it wouldn't, but thought I'd check.

from node-foreman.

Iristyle avatar Iristyle commented on May 24, 2024

Capistrano already chmods the directory to be writable.

IMHO, Capistrano is a bit broken when it comes to setting up security properly. It kind of assumes that the SSH account that it's executing scripts from, is the same account you're using to run the application... which I don't agree with.

In my particular case, I setup a deployers group, and my deployment path is owned by the SSH user and the deployers group. The account that I'm SSHing in with is a member of deployers and has write access to the path where the files are being served from. Another app-specific lower-privileged user is also a member of deployers and has only read access to the files, except for the #{app_dir}/shared/logs, where it is allowed to write.

So based on how I have things setup, I think additionally chowning the logs dir shouldn't be an issue. But I'm not sure if this is necessarily something node-foreman should configure. I understand why you might want to do this... but I wonder if assuming that the file system should be modified like that is a good idea.

It doesn't appear that the original Ruby source makes the assumption that it should change ownership -- at least I couldn't find anything there -- https://github.com/ddollar/foreman/blob/master/lib/foreman/export/upstart.rb

from node-foreman.

groundwater avatar groundwater commented on May 24, 2024

They do chown the logs file, see https://github.com/ddollar/foreman/blob/master/data/export/upstart/master.conf.erb

It's part of the upstart job, node-foreman doesn't actually do it. If all else fails, you still have the option of post-processing the upstart files. It wouldn't be perfect, but it's still "automatable" if that's a word.

I'm gonna migrate this to a pull request #5

See if those changes will meet your needs.

from node-foreman.

Iristyle avatar Iristyle commented on May 24, 2024

Ahh, good find -- apologies. Right you are. Missed it in the Upstart confs!

Awesome -- thanks for implementing. One step closer to pulling Ruby out of my server stacks.

from node-foreman.

groundwater avatar groundwater commented on May 24, 2024

Published this change in v0.0.16

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