MQTT Home Emulation
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Makefile 989B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. DOCKER_COMP = sudo docker-compose
  2. help:
  3. echo Help is not yet implemented...
  4. nodered:
  5. if [ ! -d nodered ]; then tar -xvzf nodered.tgz; fi
  6. mqtt:
  7. if [ ! -d mqtt ]; then tar -xvzf mqtt.tgz; fi
  8. build: mqtt nodered
  9. $(DOCKER_COMP) build
  10. up: mqtt nodered ## Starts the docker hub
  11. $(DOCKER_COMP) up
  12. up_%: mqtt nodered ## Start a single service
  13. $(DOCKER_COMP) up $(subst up_,,$@)
  14. down: ## Stops the docker hub
  15. $(DOCKER_COMP) down --remove-orphans
  16. restart: ## Restarts the docker hub
  17. $(DOCKER_COMP) restart
  18. status: ## Prompt Containers
  19. $(DOCKER_COMP) ps
  20. sh_%: ## Connects to the application container
  21. $(DOCKER_COMP) exec $(subst sh_,,$@) sh
  22. bash_%: ## Connects to the application container
  23. $(DOCKER_COMP) exec $(subst bash_,,$@) bash
  24. logs: ## Displays the logs of the application container
  25. $(DOCKER_COMP) logs -f
  26. logs_%: ## Displays the logs of the application container
  27. $(DOCKER_COMP) logs -f $(subst logs_,,$@)
  28. cleanall:
  29. rm -rf mqtt nodered
  30. sudo docker system prune -a