SOLVED Is there any way to make a docker container auto-restart after a period of time ?

Joined
Nov 13, 2022
Messages
39
Okay so basically I have an app (doplarr from truecharts) that I use.
Doplarr is basically a discord bot, however there is a known issue with this app where it just stops working. The bot is online, but the container is basically dead and stops accepting commands (timeout)

The only solution to this is restarting the container. It's extremely annoying because it does that every hour or so.

Is there any way I can make the container auto-restart each 60-minutes ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

Make a script that does the job you want (from the thread above) and then run that script in a cron task each hour.

Or if you don't feel like messing around with all that... install heavyscript (https://github.com/Heavybullets8/heavy_script) and use that...

heavyscript -r <appname>

just run that in a cron task every hour.
 
Last edited:
Joined
Nov 13, 2022
Messages
39

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Visit the link, there are install instructions on the page.
 
Joined
Nov 13, 2022
Messages
39
Gave it a shot and it works perfectly. Nice !
 
Top