Update server stop delay and comments in app.py and docker-compose.yml

This commit is contained in:
Janis
2023-12-19 19:39:03 +01:00
parent 4844c26002
commit e0bfc6a0ef
2 changed files with 4 additions and 4 deletions

View File

@@ -34,8 +34,8 @@ def main() -> None:
for service_name in docker_handler.get_port_map().values(): for service_name in docker_handler.get_port_map().values():
minecraft_server_handler.add_server(service_name) minecraft_server_handler.add_server(service_name)
logging.info('[INIT] wait 10 seconds before stopping all servers...') logging.info('[INIT] wait 20 seconds before stopping all servers...')
time.sleep(10) time.sleep(20)
minecraft_server_handler.stop_all_servers() minecraft_server_handler.stop_all_servers()
logging.info('[INIT] minecraft server handler initialized') logging.info('[INIT] minecraft server handler initialized')

View File

@@ -77,7 +77,7 @@ services:
mc: mc:
container_name: example_mc_server_1 container_name: example_mc_server_1
image: itzg/minecraft-server image: itzg/minecraft-server
restart: unless-stopped #! This is important. If you restart the server automatically, the auto_starter will not work restart: unless-stopped #! This is important. If you restart the server always automatically, the auto_starter will not work
environment: environment:
type: "PAPER" type: "PAPER"
EULA: "TRUE" EULA: "TRUE"
@@ -89,7 +89,7 @@ services:
mc2: mc2:
container_name: example_mc_server_2 container_name: example_mc_server_2
image: itzg/minecraft-server image: itzg/minecraft-server
restart: unless-stopped #! This is important. If you restart the server automatically, the auto_starter will not work restart: unless-stopped #! This is important. If you restart the server always automatically, the auto_starter will not work
environment: environment:
type: "PAPER" type: "PAPER"
EULA: "TRUE" EULA: "TRUE"