Open Zetrs opened 3 years ago
I'm not super familiar with Docker and its port mapping, but what happens if you explicitly map 9293:9293
?
guard runs in the same docker container as puma, i think there is no need in any port mappings..
I forgot to say that it's a Windows WSL2 container. Tried to add EXPOSE 9293 and portmap 9293:9293 - same error
Is there any news on this problem? I do have the same error in Docker (vscode devcontainer) on a mac.
To be honest, I don't even program Ruby anymore and I try to avoid Docker as much as possible. Can someone put together an extra example repo that displays the behavior?
For reference and for anyone, who is looking for a solution. I solved this by using the guard-yield gem (https://github.com/guard/guard-yield) with the following Guardfile:
restart_puma = proc do
system("pumactl -P tmp/pids/puma.pid restart")
end
guard :yield, { :run_on_modifications => restart_puma } do
...
end
Needs something like
pidfile 'tmp/pids/puma.pid'
in puma config
The gem works as is in Docker, though you do need to specifically disable all terminal interactions with the -i
argument. https://github.com/guard/guard/wiki/Command-line-options-for-Guard#-i--no-interactions-option
For example
CMD ["bundle", "exec", "guard", "-i"]
PR to add a note to the README: https://github.com/jc00ke/guard-puma/pull/47
@jc00ke if you're looking for a new maintainer here, I could potentially help.
@duffn thanks for the offer and the PR! If you have specific updates you'd like to see to this project, open some issues and we can chat about it. After a few merged PRs I'd be interested in adding you as a collaborator.
@Zetrs can you try out @duffn's suggestion of using the -i
flag that was merged in df43e9a and let us know how that goes for you? Thanks!
Trying to use guard-puma with docker and bridge network, like this:
And container exiting with this error in docker logs:
Pumas
config/puma.rb
has this string:activate_control_app "tcp://localhost:9293"
and when i connecting to container with running puma (without guard) i can reach http://localhost:9293 with curl.My Guard file:
Any ideas what it can be?