docker-compose.yml 997 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. version: '2.2'
  2. networks:
  3. default:
  4. driver_opts:
  5. com.docker.network.bridge.name: itr-cc1101-mqtt
  6. #volumes:
  7. # config:
  8. services:
  9. broker:
  10. # v2 binds to loopback device
  11. # https://github.com/eclipse/mosquitto/blob/v2.0.0/ChangeLog.txt#L6
  12. image: docker.io/eclipse-mosquitto:1.6
  13. user: mosquitto
  14. read_only: yes
  15. #ports: ['127.0.0.1:1883:1883/tcp']
  16. cap_drop: [all]
  17. security_opt: [no-new-privileges]
  18. cpus: 0.4
  19. mem_limit: 32M
  20. client:
  21. build: .
  22. image: fphammerle/intertechno-cc1101-mqtt
  23. #volumes:
  24. #- config:/etc/wireless-sensor-mqtt:ro
  25. command: intertechno-cc1101-mqtt
  26. --mqtt-host broker
  27. # --mqtt-username raspberrypi
  28. # --mqtt-password-file /etc/wireless-sensor-mqtt/mqtt-password
  29. devices: [/dev/spidev0.0]
  30. read_only: true
  31. cap_drop: [all]
  32. security_opt: [no-new-privileges]
  33. # docker-compose >=2.2,<3
  34. cpus: 0.4
  35. mem_limit: 32M
  36. # https://docs.docker.com/compose/compose-file/compose-file-v2/