rvanlaar / dokku-nginx-stream

dokku plugin to open TCP ports on the application for the outside world.
12 stars 10 forks source link

Install hook may fail if there is already a stream block #1

Open josegonzalez opened 4 years ago

josegonzalez commented 4 years ago

Not sure how we might detect an existing stream block, but thats one potential issue.

rvanlaar commented 4 years ago

Noted. Ran into this problem when testing.

Regular nginx configurations don't seem to include a stream block.

josegonzalez commented 4 years ago

Yep thats correct. My gut says that you can regex find an uncommented stream block in the conf and then add it if it isn't there.

This library could be used to parse the conf files, but dunno how strict/not strict it needs to be.

rvanlaar commented 4 years ago

I'm rating this as a low priority issue. I've yet to see a default config that includes a stream directive. When that happens, I'll be happy to work with those affected to include a fix.