Redis queue intergration #30
-
Using this image with redis and "blomstra/flarum-redis" needs the queue-worker to be started automatically. Manually you qould do a "php flarum queue:work" to do that. How can this command included into this image to allow to wrok with redis for queue? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @jwesemann When you use my Docker images, you can run your shell script when the container starts by copying your script into the /startup/ directory of the container and giving it execute permissions using chmod. You can create a file similar to the one below, name it
Best regards. |
Beta Was this translation helpful? Give feedback.
-
Hi Shin,
thanks for the quick an drtailed answer. I implemented it using a bind
mound to inject the script file into /startup. Works nicely.
Now I am able to go to redis queue in production :-)
Best regards
Jörg
------
Am 2023-10-11 05:26, schrieb Shin:
Hi @jwesemann [1]
When you use my Docker images, you can run your shell script when the
container starts by copying your script into the /startup/ directory of
the container and giving it execute permissions using chmod.
You can create a file similar to the one below, name it
flarum-worker.sh, and then place it in the /startup/ directory of your
container.
#!/bin/sh
php $WEBHOME/flarum queue:work >/proc/1/fd/1 2>/proc/1/fd/2
Best regards.
--
Reply to this email directly, view it on GitHub [2], or unsubscribe
[3].
You are receiving this because you were mentioned.Message ID:
***@***.***>
Links:
------
[1] https://github.com/jwesemann
[2]
#30 (comment)
[3]
https://github.com/notifications/unsubscribe-auth/AKKLRVYPF26NPHVG65VLEZ3X6YGXZAVCNFSM6AAAAAA52VKKLGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TENBXHEZTM
--=_7d965c0c8a3764d41a3f5c0f4e1b6b76
Content-Type: multipart/related; boundary="=_7ee72eafaf2504ca6f8c85f871730445"
--=_7ee72eafaf2504ca6f8c85f871730445
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; charset=
=3DUTF-8" /></head><body style=3D'font-size: 10pt; font-family: Verdana,Gen=
eva,sans-serif'>
<p>Hi Shin,</p>
<p>thanks for the quick an drtailed answer. I implemented it using a bind m=
ound to inject the script file into /startup. Works nicely.</p>
<p>Now I am able to go to redis queue in production :-)</p>
<p>Best regards<br />Jörg</p>
<p>------</p>
<p id=3D"reply-intro">Am 2023-10-11 05:26, schrieb Shin:</p>
<blockquote type=3D"cite" style=3D"padding: 0 0.4em; border-left: #1010ff 2=
px solid; margin: 0">
<div id=3D"replybody1">
<p><br /></p>
<p dir=3D"auto">Hi <a class=3D"v1user-mention v1notranslate" href=3D"https:=
//github.com/jwesemann" target=3D"_blank" rel=3D"noopener ***@***.***=
emann</a></p>
<p dir=3D"auto">When you use my Docker images, you can run your shell scrip=
t when the container starts by copying your script into the /startup/ direc=
tory of the container and giving it execute permissions using chmod.</p>
<p dir=3D"auto">You can create a file similar to the one below, name it <co=
de class=3D"v1notranslate">flarum-worker.sh</code>, and then place it in th=
e <code class=3D"v1notranslate">/startup/</code> directory of your containe=
r.</p>
<pre class=3D"v1notranslate"><code class=3D"v1notranslate">#!/bin/sh
php $WEBHOME/flarum queue:work >/proc/1/fd/1 2>/proc/1/fd/2
</code></pre>
<p dir=3D"auto">Best regards.</p>
<p style=3D"font-size: small; -webkit-text-size-adjust: none; color: #666;"=
—<br />Reply to this email directly, <a href=3D"https://github.com/s=
hinsenter/php/discussions/30#discussioncomment-7247936" target=3D"_blank" r=
el=3D"noopener noreferrer">view it on GitHub</a>, or <a href=3D"https://git=
hub.com/notifications/unsubscribe-auth/AKKLRVYPF26NPHVG65VLEZ3X6YGXZAVCNFSM=
6AAAAAA52VKKLGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TENBXHEZTM" =
target=3D"_blank" rel=3D"noopener noreferrer">unsubscribe</a>.<br />You are=
receiving this because you were mentioned.<img src=3D"cid:1697015875652668=
***@***.***" width=3D"1" height=3D"1" /><span style=3D"=
color: transparent; font-size: 0; display: none; visibility: hidden; overfl=
ow: hidden; opacity: 0; width: 0px; height: 0px; max-width: 0; max-height: =
0; mso-hide: all;">Message ID: <span><shinsenter/php/repo-discussions/30=
/comments/7247936</span><span>@</span><span>github</span><span>.</span><spa=
n>com></span></span></p>
</div>
</blockquote>
</body></html>
…--=_7ee72eafaf2504ca6f8c85f871730445
Content-Transfer-Encoding: base64
Content-ID: ***@***.***>
Content-Type: image/gif;
name=blocked.gif
Content-Disposition: inline;
filename=blocked.gif;
size=118
R0lGODlhZAAyAIAAAPrOzgAAACH5BAAAAAAALAAAAABkADIAAAJNhI+py+0Po5y02ouz3rz7D4bi
SJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8YhMKpfMpvMJjUqn1Kr1is1qt9yu9wsOi8fksvls
KwAAOw==
--=_7ee72eafaf2504ca6f8c85f871730445--
--=_7d965c0c8a3764d41a3f5c0f4e1b6b76--
|
Beta Was this translation helpful? Give feedback.
Hi @jwesemann
When you use my Docker images, you can run your shell script when the container starts by copying your script into the /startup/ directory of the container and giving it execute permissions using chmod.
You can create a file similar to the one below, name it
flarum-worker.sh
, and then place it in the/startup/
directory of your container.Best regards.