Advertisement
Javi

bash: launch iot as docker service

Jul 28th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.90 KB | None | 0 0
  1. # Fauxmo:
  2.  
  3. docker run --name fauxmo -v $HOME:/config -d --restart unless-stopped --network host ciberado/fauxmo-docker-rpi
  4.  
  5. # Telegraf:
  6.  
  7. docker run -d -v $PWD/telegraf.conf:/etc/telegraf/telegraf.conf:ro --network=host --restart=unless-stopped arm32v7/telegraf
  8.  
  9. # Prometheus
  10. docker volume create prometheus-data
  11. docker run -d -v $PWD/prometheus.yml:/etc/prometheus/prometheus.yml:ro --network=host --restart=unless-stopped prom/prometheus
  12.  
  13. # Grafana
  14. docker run -d -p 3000:3000 --name=grafana --restart=unless-stopped -e "GF_SECURITY_ALLOW_EMBEDDING=true" grafana/grafana
  15.  
  16. # Smartclock
  17. git clone https://github.com/ciberado/smartclock.git
  18. docker run --name smartclock -d -p 8080:80 -v $(pwd)/smartclock:/usr/share/nginx/html:ro nginx:alpine
  19.  
  20.  
  21. ## docker-compose
  22.  
  23. services:
  24. mosquitto:
  25. container_name: mosquitto
  26. image: eclipse-mosquitto
  27. ports:
  28. - 1883:1883/tcp
  29. restart: unless-stopped
  30. network_mode: host
  31. grafana:
  32. container_name: grafana
  33. entrypoint:
  34. - /run.sh
  35. environment:
  36. - PATH=/usr/share/grafana/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  37. - GF_PATHS_CONFIG=/etc/grafana/grafana.ini
  38. - GF_PATHS_DATA=/var/lib/grafana
  39. - GF_PATHS_HOME=/usr/share/grafana
  40. - GF_PATHS_LOGS=/var/log/grafana
  41. - GF_PATHS_PLUGINS=/var/lib/grafana/plugins
  42. - GF_PATHS_PROVISIONING=/etc/grafana/provisioning
  43. expose:
  44. - 3000/tcp
  45. image: grafana/grafana
  46. restart: unless-stopped
  47. user: grafana
  48. volumes:
  49. - /home/pi/grafana_defaults.ini:/usr/share/grafana/conf/defaults.ini
  50. working_dir: /usr/share/grafana
  51. network_mode: host
  52. # homie:
  53. # command:
  54. # - 'node index.js'
  55. # container_name: homie
  56. # image: ciberado/homie
  57. # restart: unless-stopped
  58. prometheus:
  59. container_name: prometheus
  60. expose:
  61. - 9090/tcp
  62. image: prom/prometheus
  63. restart: unless-stopped
  64. volumes:
  65. - prometheus-data:/prometheus
  66. - /home/pi/prometheus.yml:/etc/prometheus/prometheus.yml
  67. working_dir: /prometheus
  68. network_mode: host
  69. smartclock:
  70. container_name: smartclock
  71. image: nginx:alpine
  72. ports:
  73. - 8080:80/tcp
  74. volumes:
  75. - /home/pi/smartclock:/usr/share/nginx/html:ro
  76. network_mode: host
  77. telegraf:
  78. container_name: telegraf
  79. expose:
  80. - 8092/udp
  81. - 8125/udp
  82. - 8094/tcp
  83. image: arm32v7/telegraf
  84. ipc: private
  85. restart: unless-stopped
  86. volumes:
  87. - /home/pi/telegraf.conf:/etc/telegraf/telegraf.conf:ro
  88. network_mode: host
  89. transmission:
  90. container_name: transmission
  91. image: linuxserver/transmission
  92. ports:
  93. - 9091:9091/tcp
  94. - 51413:51413/tcp
  95. - 51413:51413/udp
  96. restart: unless-stopped
  97. volumes:
  98. - /media/transmission:/config
  99. - /media/torrent:/downloads
  100. network_mode: host
  101. version: "3"
  102. volumes:
  103. prometheus-data:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement