Replies: 1 comment 1 reply
-
I have added an example here showing how to do it: https://github.com/socketry/async-container/tree/main/examples/puma Can you let me know if this works for you? |
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
This is a follow-up to #34.
What's the best way (or is it not possible or not recommended?) to run a Puma server within an async container?
Some context as to why I'm doing this:
async-container
with those.async-container
.The two problems I'm encountering are:
SIGHUP
. As discussed in Restarting containers with arbitrary processes using SIGHUP #34, we need to manually notify the container that the process is ready. I don't have control over Puma's executable, so not sure how to do this?ready: true
when callinginstance.exec
to work around the above issue, sendingSIGHUP
crashes the process because the new process is trying to bind to the same UNIX socket as the existing process throwing an error. Again not sure what the best way to work around this is?Code
Here's a simple prototype I threw together for this. Amend the UNIX socket path in
start
and then runbundle && bundle exec start
.async-container-puma.zip
Beta Was this translation helpful? Give feedback.
All reactions