docker-compose.yml 744 B

12345678910111213141516171819202122232425262728
  1. version: '2.2'
  2. volumes:
  3. config:
  4. services:
  5. mqtt_client:
  6. build: .
  7. image: fphammerle/systemctl-mqtt
  8. volumes:
  9. - config:/etc/systemctl-mqtt:ro
  10. - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:rw
  11. command: systemctl-mqtt
  12. --mqtt-host mqtt-broker.local
  13. --mqtt-username raspberrypi
  14. --mqtt-password-file /etc/systemctl-mqtt/mqtt-password
  15. hostname: raspberrypi
  16. network_mode: host # TODO verify required
  17. userns_mode: host # required for host network mode
  18. user: root # TODO
  19. security_opt:
  20. - no-new-privileges
  21. - apparmor=unconfined # TODO
  22. # docker-compose >=2.2,<3
  23. cpus: 0.4
  24. mem_limit: 32M
  25. # https://docs.docker.com/compose/compose-file/compose-file-v2/