Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyaml
version: '3.4'

services:
  mongo:
    image: mongo:64.04
    restart: always
    healthcheck:
      test: echo 'db.runCommand("ping").ok' | mongo mongo:27017/test --quiet
      interval: 60s
      timeout: 60s
      retries: 5
      start_period: 60s
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: example
    volumes:
      - mongo_data:/var/lib/mongodb
    networks:
      - backend

  nmis:
    image: public.ecr.aws/n2x4v8j4/firstwave/nmis9_omk:v1.0
    restart: always
    environment:
      NMIS_DB_USERNAME: root
      NMIS_DB_PASSWORD: example
      NMIS_DB_SERVER: mongo
      NMIS_SERVER_NAME: example-host-1
    depends_on:
      mongo:
        condition: service_healthy
    volumes:
      - log_data:/usr/local/nmis9/logs
      - var_data:/usr/local/nmis9/var
      - conf_data:/usr/local/nmis9/conf
      - database_data:/usr/local/nmis9/database
# You can mount your own config files into volumes in the container but 
# you must ensure that the db config details match whats in this compose file
#     - ./app_conf/Config.nmis:/usr/local/nmis9/conf/Config.nmis
#     - ./app_conf/opCommon.json:/usr/local/omk/conf/opCommon.json
#     - ./app_conf/opLicense.json:/usr/local/omk/conf/opLicense.json
    ports:
      - "8080:8080"
      - "8042:8042"
    networks:
      - backend

networks:
  backend:

volumes:
  log_data:
  var_data:
  conf_data:
  database_data:
  mongo_data:

...

  • MongoDB root password

  • NMIS admin credentials

**Important - to change the mongo password - please change it in the mongo database before changing any configurations or environment variables

docker exec -it container_name mongo -u root -p example

use admin
db.changeUserPassword("root", "new_password")
exit

  1. SSL/TLS Configuration:

  • Use strong SSL protocols (TLSv1.2+)

  • Regularly update SSL certificates

  • Implement proper cipher suites

...