thmhoag / arkserver

Docker image for a dedicated ARK Server with ArkManager.
MIT License
121 stars 43 forks source link

Container restart policy not set by documented "docker run" command #14

Open GotSka81 opened 4 years ago

GotSka81 commented 4 years ago

Image Setup Details

Description of Issue

The container restart policy is not set by documented "docker run" command. The default restart policy for Docker is "no", and as a result, the container will stop and fail to restart when the arkmanager CRON job for restarting the ark server instance triggers. This CRON job runs at 10:15am every day (UTC time).

Additional Information

Docker documentation about restart policy: https://docs.docker.com/config/containers/start-containers-automatically/

CRON job code from run.sh file that triggers restart (line 69): 15 10 * arkmanager restart --warn --saveworld

Recommend updating documented "docker run" command to include "--restart always"

thmhoag commented 4 years ago

Hey @GotSka81, great find on this one. The docs in this repo could certainly use some improvement. I think I almost always add the --restart always flag to all my containers so I guess I didn't think about it when writing the docs.

That said, this would be a great first-issue for a PR if you'd like to contribute. πŸ˜„

Trollkoekske commented 3 years ago

Hey @thmhoag,

Is there any way to change the restart time? Used the --restart always and works fine πŸ‘

jkread commented 3 years ago

Hey @thmhoag,

Is there any way to change the restart time? Used the --restart always and works fine πŸ‘

You can change the cronjob to change when the server does its server and restart. Be aware this doesn't currently honor Timezones. I fixed this issue and a few others in my fork. https://github.com/jkread/arkserver