Skip to content
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

Merged
merged 3 commits into from
Apr 19, 2021

Conversation

m0ngr31
Copy link
Contributor

@m0ngr31 m0ngr31 commented Apr 14, 2021

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.

@@ -23,6 +23,9 @@ case "$BOT_BINARY" in
cleaner*)
./cleaner
;;
all*)
./el_monitorro & ./sync & ./deliver & ./cleaner
Copy link
Owner

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?

Copy link
Contributor Author

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.

Copy link
Owner

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?

Copy link
Contributor Author

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

@ayrat555 ayrat555 merged commit 67b4d49 into ayrat555:master Apr 19, 2021
@ayrat555
Copy link
Owner

@m0ngr31 I published a new docker image version (ayratbadykov/el_monitorro:latest or ayratbadykov/el_monitorro:0.1.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants