version: "3"

services:
  # Démon Clamav-
  clamav:
    image: clamav/clamav:stable
    restart: unless-stopped
    ports:
      - 3310:3310
    volumes:
      - type: volume
        source: clamav-db
        target: /var/lib/clamav
    networks:
      clam-net:

  # Interface REST - https://github.com/benzino77/clamav-rest-api
  clamav-rest-js:
    image: benzino77/clamav-rest-api
    restart: unless-stopped
    ports:
      - 8081:3000
    depends_on:
      - clamav
    environment:
      - NODE_ENV=production
      - CLAMD_IP=clamav
      - APP_FORM_KEY=FILES
      - APP_PORT=3000
    networks:
      clam-net:

volumes:
  # Le volume clamav permet de conserver la base de signature sur la durée
  clamav-db:

networks:
