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.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 ourdesktop/nakama
directory used above, which would be available atnakama/data
in 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/data
folder that you made available to Docker, above.
PostgreSQL #
my-config.yml
|
|
CockroachDB #
my-config.yml
|
|
- Open your
docker-compose.yml
file again, this time to edit thenakama:entrypoint
entry to add the--config
flag 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:
|
|