mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
1.3 KiB
1.3 KiB
AutoStop
An option to stop the server after a specified time has been added for niche applications (e.g. billing saving on AWS Fargate). The function is incompatible with the Autopause functionality, as they basically cancel out each other.
!!! note
the docker container variables have to be set accordingly (restart policy set to "no") and that the container has to be manually restarted.
A starting, example compose file has been provided in examples/docker-compose-autostop.yml.
Enable the Autostop functionality by setting:
-e ENABLE_AUTOSTOP=TRUE
The following environment variables define the behavior of auto-stopping:
AUTOSTOP_TIMEOUT_EST
, default3600
(seconds) describes the time between the last client disconnect and the stopping of the server (read as timeout established)AUTOSTOP_TIMEOUT_INIT
, default1800
(seconds) describes the time between server start and the stopping of the server, when no client connects in-between (read as timeout initialized)AUTOSTOP_PERIOD
, default10
(seconds) describes period of the daemonized state machine, that handles the stopping of the server
To troubleshoot, add
DEBUG_AUTOSTOP=true
to see additional output