Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. .PHONY: up
  2. up: ## Start all the services
  3. docker-compose up -d --remove-orphans
  4. .PHONY: start
  5. start: up install-deps ## Start openpod application
  6. docker-compose exec open-pod iex -S mix phx.server
  7. .PHONY: install-deps
  8. install-deps: container/open-pod ## Install open-pod dependencies
  9. docker-compose exec open-pod mix deps.get
  10. .PHONY: stop
  11. stop: ## Shoutdown services
  12. docker-compose down -v
  13. .PHONY: help
  14. help:
  15. @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  16. container/%:
  17. @docker ps -q --no-trunc --filter status=running | grep $$(docker-compose ps -q $*) >/dev/null 2>&1 || docker-compose up -d $*
  18. .PHONY: build
  19. build: check-version
  20. @docker build -t openpod/open-pod:latest .
  21. @docker push openpod/open-pod:latest
  22. @docker build -t openpod/open-pod:${VERSION} .
  23. .PHONY: publish
  24. publish: check-version
  25. @docker push openpod/open-pod:${VERSION}
  26. .PHONY: build-publish
  27. build-publish: check-version build publish
  28. check-version:
  29. ifndef VERSION
  30. $(error VERSION is undefined)
  31. endif