-
Notifications
You must be signed in to change notification settings - Fork 57
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
Clean shutdown #4
Comments
The world definitely saves periodically, and as far as I can tell as long as I do a "soft" shutdown of the container it saves the world before exit. |
The container is just a wrapper for the server code itself. So how ever the server handles a shutdown is how that works. I assume it will attempt to send a normal shutdown command and it should only issue a kill command if the process doesn't close in a certin amount of time. |
After some testing I dont think ether Vanilla or Tshock will do a save before closing. I will re-open this and see if I can add it to the startup script. Tho It may take a while. |
Thanks for looking into this! Based on my own testing, I agree. It doesn't seem to do a save before closing, it seems to just kill the process. It would be nice if we could send the "exit" command (which saves and exits the server) to the Terraria server process when the container is stopped. |
How is this looking? Came across this the other day and was super happy to see it being talked about. Was interested in trying my hand at it, but if it is already in the works or anything then I'll leave it to whomever. |
Super subscribed! Appreciate the work on this. |
@AustinMcPhail I have not had time to work on this feature, feel free to take a crack at it. |
I was looking at this too, and think it should be possible to install The relevant bits are:e
I bet this could be adapted into a startup script for docker, so I am going to give this a try today. Edit: I give up; all this pseudo TTY attach stuff is outside of my expertise. |
I finally settled with the following scripts: https://gist.github.com/Noutbuk/85d455a90fa68862c9437678f89d27d7 |
When I stop this container, does it perform a clean shutdown of the server? In other words, does it command the Terraria server to save the world file before killing the process? Or is it possible that world data could be lost upon stopping the container if the world file was not saved recently?
If not, then can the container be modified to include this feature so that world data will not be lost?
docker-compose config:
The text was updated successfully, but these errors were encountered: