这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@isundaylee
Copy link
Contributor

Add two nginx subcommands to display nginx error/access logs for a particular app.

closes #1159

Add two nginx subcommands to display nginx error/access logs for a particular app.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be pared down to /usr/bin/tail /var/log/nginx/* and /usr/bin/tail -f /var/log/nginx/*. Test this of course. 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I think about it, allowing any user with access to the dokku account to tail any file, is a security risk I don't think is worth introducing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing the plugin plugin, I remembered that we assume dokku will be run by root and thus we sudo su - dokku here: https://github.com/progrium/dokku/blob/63d89942438e2806c5322c2ecddbe2d008e03f42/dokku#L44-L47

Therefore I think we can just filter these commands as well to make them not sudo. I'll create a new PR based on this work.

@josegonzalez
Copy link
Member

@isundaylee mind updating the PR to match expectations?

@josegonzalez
Copy link
Member

Closing in favor of #1469. Thanks for your work @isundaylee!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dokkus nginx-vhost plugin should make nginx access.log and error.log available via a command

3 participants