version: '2'
services:
  data:
    image: tianon/true
    volumes:
        - /var/lib/postgresql/data
        - /var/log/opennms
        - /var/opennms/rrd
        - /var/opennms/reports
  database:
    image: postgres
    env_file:
      - .postgres.env
    ports:
      - "5432:5432"
    depends_on:
      - data
  opennms:
    image: indigo/docker-opennms
    env_file:
      - .opennms.env
      - .postgres.env
    depends_on:
      - database
      - data
    volumes_from:
      - data:rw
    command: ["-f"]
    ports:
      - "8980:8980"
      - "18980:18980"
      - "1099:1099"
      - "8101:8101"
      - "61616:61616"
      - "5817:5817"
      - "162:162/udp"

version: '2'
services:
  data:
    image: tianon/true
    volumes:
        - /var/lib/postgresql/data
        - /var/log/opennms
        - /var/opennms/rrd
        - /var/opennms/reports
        - /opt/opennms/etc
  database:
    image: postgres
    env_file:
      - .postgres.env
    ports:
      - "5432:5432"
    depends_on:
      - data
  opennms:
    image: indigo/docker-opennms
    env_file:
      - .opennms.env
      - .postgres.env
    depends_on:
      - database
      - data
    volumes_from:
      - data:rw
    command: ["-f"]
    ports:
      - "8980:8980"
      - "18980:18980"
      - "1099:1099"
      - "8101:8101"
      - "61616:61616"
      - "5817:5817"
      - "162:162/udp"

Add etc directory to data container
Add etc directory to data container
