Nakama Configuration
There are many ways to configure how your Nakama server runs and behaves. Consult our Server Configuration guide for detailed instructions and a full list of options.
The following section details how to set up Docker and Docker Compose to use your configuration settings.
Docker Configuration #
To configure Nakama via Docker, you can create a YML file with all the configurations you want to set and then pass that file to your Docker container.
First, you will need to make a local storage volume available to Docker:
- Open your
docker-compose.ymlfile in your preferred text editor. - Edit the
nakama:volumes:entry to specify your desired volume. For example, to create a/datafolder in ourdesktop/nakamadirectory used above, which would be available atnakama/datain your Docker container, it would look like the following:
| |
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:
| |
- Next, create your custom configuration file, for example
my-config.yml, and place it in the/datafolder that you made available to Docker, above.
PostgreSQL #
my-config.yml
| |
CockroachDB #
my-config.yml
| |
- Open your
docker-compose.ymlfile again, this time to edit thenakama:entrypointentry to add the--configflag pointing to your configuration file. It should look like this:
| |
- Save the changed file and restart your Docker containers for the change to take effect. From your Terminal:
| |
