services:
  netdisco-postgresql:
    image: netdisco/netdisco:2.102001-postgresql
    container_name: oam-netdisco-db
    environment:
      - POSTGRES_USER=netdisco
      - POSTGRES_PASSWORD=netdisco
      - POSTGRES_DB=netdisco
    volumes:
      - /opt/oam/netdisco/pgdata:/var/lib/postgresql/data
    restart: unless-stopped

  netdisco-backend:
    image: netdisco/netdisco:2.102001-backend
    container_name: oam-netdisco-backend
    depends_on:
      - netdisco-postgresql
    environment:
      - NETDISCO_DB_HOST=netdisco-postgresql
      - NETDISCO_DB_NAME=netdisco
      - NETDISCO_DB_USER=netdisco
      - NETDISCO_DB_PASS=netdisco
      - NETDISCO_SNMP_COMMUNITY=kn3lmgmt
    volumes:
      - /opt/oam/netdisco/config/deployment.yml:/home/netdisco/environments/deployment.yml
      - /opt/oam/netdisco/data:/home/netdisco/netdisco-sqlite
    restart: unless-stopped

  netdisco-web:
    image: netdisco/netdisco:2.102001-web
    container_name: oam-netdisco-web
    depends_on:
      - netdisco-postgresql
      - netdisco-backend
    environment:
      - NETDISCO_DB_HOST=netdisco-postgresql
      - NETDISCO_DB_NAME=netdisco
      - NETDISCO_DB_USER=netdisco
      - NETDISCO_DB_PASS=netdisco
    ports:
      - "8082:5000"
    volumes:
      - /opt/oam/netdisco/config/deployment.yml:/home/netdisco/environments/deployment.yml
    restart: unless-stopped
