Run cockroachdb in secure mode using docker compose

Hi, does anyone know how to run cockroachdb in secure mode using docker compose?
I’ve tried using “–certs-dir” instead of “–insecure” in the docker-compose file but it gives me an error saying that it cannot load certificates. Anyone know what I’m supposed to do?

This is the code from my docker compose file running cockroachdb in insecure mode.

version: ‘3’
services:
cockroachdb:
container_name: cockroachdb
image: cockroachdb/cockroach:v19.2.5
command: start --insecure --store=attrs=ssd,path=/var/lib/cockroach/
restart: always
volumes:
- data:/var/lib/cockroach
expose:
- “8080”
- “26257”
ports:
- “26257:26257”
- “8080:8080”
nakama:
container_name: nakama
image: heroiclabs/nakama:2.12.0
entrypoint:
- “/bin/sh”
- “-ecx”
- >
/nakama/nakama migrate up --database.address root@cockroachdb:26257 &&
exec /nakama/nakama --config /nakama/data/my-special-config.yml
restart: always
links:
- “cockroachdb:db”
depends_on:
- cockroachdb
volumes:
- ./:/nakama/data
expose:
- “7349”
- “7350”
- “7351”
ports:
- “7349:7349”
- “7350:7350”
- “7351:7351”
healthcheck:
test: [“CMD”, “curl”, “-f”, “http://localhost:7350/”]
interval: 10s
timeout: 5s
retries: 5
volumes:
data:

The certificates need to be in a directory that the container can get to and you point the flag to that directory

--certs-dir=/mysecuredir/certs