Cockpit doesnt use mongo

Hi,
I was following the docker tutorial to use mongo )https://getcockpit.com/documentation/reference/docker),
built the image with the php described, and use the docker-compose.yml.
the issue is that cockpit is using sqlite …
any idea what is missing with the configuration in order for cockpit use the mongo ?
Thanks,
Amit

Hey @amitca, I;m not using the default docker, instead I have in my docker composer:

  mongo-cockpit:
    image: mongo
    container_name: "cockpit_mongo"
    environment:
      MONGO_INITDB_DATABASE: "cockpitdb"
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: root

and in the config.yaml I have my connection string as:

database:
  server: mongodb://mongo-cockpit:27017
  options:
    db: cockpitdb
    username: root
    password: root

hope that helps

1 Like