Docker Compose Questions

Hi there,

I’m working with Nakama for the first time and have a few questions about the docker-compose.yml file provided.

image: registry.heroiclabs.com/heroiclabs/nakama:3.15.0
image: cockroachdb/cockroach:latest-v20.2

Is there a reason to use these versions in particular, or are the more recent releases workable? I see v3.15.0 is the latest Nakama release on Docker Hub, similar situation for Cockroach DB.

expose:
    - "8080"
    - "26257"
ports:
    - "26257:26257"
    - "8080:8080"

To my knowledge, expose forwards ports internally, whereas ports forwards them internally and externally. Listing the same ports in both sections seems redundant. Is there a reason for this?

healthcheck:
    interval: 3s
    timeout: 3s
    retries: 5

These healthcheck values are quite low compared to Docker defaults. Why were these values chosen instead of something higher?

image: prom/prometheus

Finally, can Prometheus be removed from the configuration? I’m not fully up to speed on how to use it, but if it is necessary for Nakama to work then I will brush up on it. I know Nakama already logs some data in the console, so I don’t see this being mandatory unless more intricate data scraping is desired.

Hi, @klaytonkowalski! And welcome to Heroic Labs forum!

The versioned docker-compose definition is meant to be used for local development and local testing only and there is no specific reason why these versions were used. You can, and should, try more recent releases :wink:

Regarding the ports, the intention was to make port usage more explicit. But feel free to remove the expose locally before running. Same goes with healthcheck: feel free to tweak it.

Prometheus is optional. Your are safe to remove it locally. The PostgreSQL docker-compose does not use it.

Cheers,
Caetano

1 Like

Great, thank you for the response!