There are many configuration options available that you can customize for your Nakama server. You can create a YML file for all configurations you want to set, and pass that file to your Docker containers.
First you will need to make a local storage volume available to Docker:
Open your docker-compose.yml file in your preferred text editor.
Edit the nakama:volumes: entry to specify your desired volume. For example, to create a /data folder in our desktop/nakama directory used above, which would be available at nakama/data in your Docker container, it would look like the following:
1
2
volumes:- ./data:/nakama/data
This will map the local ./data directory to the /nakama/data path inside the Nakama container.
Save the changed file and restart your Docker containers for the change to take effect. From your Terminal:
1
2
docker compose restart
docker compose up
Next, create your custom configuration file, for example my-config.yml, and place it in the /data folder that you made available to Docker, above.
Open your docker-compose.yml file again, this time to edit the nakama:entrypoint entry to add the --config flag pointing to your configuration file. It should look like this: