Match_terminate isn't called when server gracefully shuts down (SOLVED)

Update: I was able to fix this by changing the docker-compose.yml entrypoint from

 entrypoint:
      - "/bin/sh"

to

 entrypoint:
      - "/bin/bash"

It might be worth updating the documentation, linked below, to reflect this in case someone else bumps into this issue.

Original post:

I’m using Docker to start and stop Nakama, and Lua modules for the game logic. When Nakama is stopped, the function M.match_terminate() isn’t called in active matches for some reason.

I found this post, but wasn’t able to find an answer there.

I’m using this guide for the Docker setup:

The shutdown_grace_sec is set to 10 in config.yml. Is there something else that need to be set for the match_terminate() function to trigger on shutdown?

1 Like