-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow docker to run all commands at once #99
Conversation
@@ -23,6 +23,9 @@ case "$BOT_BINARY" in | |||
cleaner*) | |||
./cleaner | |||
;; | |||
all*) | |||
./el_monitorro & ./sync & ./deliver & ./cleaner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm running the bot on my private vps and sometimes binaries just stop because of failures. For example:
Apr 14 02:27:17 vps695005 bash[1090]: [2021-04-14T00:27:17Z ERROR telegram_bot::api] error=Bad Gateway
Apr 14 02:27:17 vps695005 bash[1090]: [2021-04-14T00:27:17Z ERROR telegram_bot::stream] request error error=Bad Gateway
Apr 14 02:27:17 vps695005 bash[1090]: [2021-04-14T00:27:17Z ERROR el_monitorro] Couldn't start a bot
Apr 14 02:27:18 vps695005 systemd[1]: el_monitorro.service: Service hold-off time over, scheduling restart.
Apr 14 02:27:18 vps695005 systemd[1]: el_monitorro.service: Scheduled restart job, restart counter is at 4.
Apr 14 02:27:18 vps695005 systemd[1]: Stopped El Monitorro bot.
Apr 14 02:27:18 vps695005 systemd[1]: Started El Monitorro bot.
I set systemd service so the service is restarted on every failure. Is it possible to restart stopped binaries inside of a docker container?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There really isn't a great way. I'm not sure if one executable crashing would kill the entire container or not. If so, it could be resolved with having docker auto-restart. Another solution would be to have the docker restart every x
hours or so to keep all the executables running properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@m0ngr31 Can you leave a comment about it and your pr is good to merge. Will you need a new release on docker hub?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that'd be great :)
I'll get the README updated
@m0ngr31 I published a new docker image version ( |
I know it's not Docker "best practice" to have multiple things running in a docker container at once, but I don't want to have to run multiple docker containers of the same thing on my Unraid box.