Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/usr/bin/make
  2. SHELL = /bin/sh
  3. USER_UID := $(shell id -u)
  4. USER_UNAME := $(shell id -un)
  5. USER_GID := $(shell id -g)
  6. USER_GNAME := $(shell id -gn)
  7. DATE_NOW := $(shell date '+%Y-%m-%d_%H%M%S')
  8. export USER_UID
  9. export USER_UNAME
  10. export USER_GID
  11. export USER_GNAME
  12. build:
  13. docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
  14. buildnc:
  15. docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
  16. buildsolrnc:
  17. docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) solr-new
  18. buildphp:
  19. docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) php
  20. buildphpnc:
  21. docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME) php
  22. up:
  23. docker-compose up -d
  24. upbuild:
  25. docker-compose up -d --build
  26. ps:
  27. docker-compose ps
  28. logs:
  29. docker-compose logs -f
  30. logs_redis:
  31. docker-compose logs -f redis
  32. down:
  33. docker-compose down
  34. restart_redis:
  35. docker-compose restart redis
  36. restart_php:
  37. docker-compose restart php
  38. restart_npm :
  39. docker-compose restart npm
  40. exec_php:
  41. docker exec -it edlpd8-php-1 bash
  42. exec_npm:
  43. docker exec -it edlpd8-npm-1 sh
  44. exec_mysql:
  45. docker exec -it edlpd8-mysql-1 bash
  46. redis:
  47. docker exec -it edlpd8-redis-1 bash
  48. dump_d8_db:
  49. docker exec edlpd8-mysql-1 sh -c 'exec mysqldump -uroot -pedlp edlp_d8' > ./ressources/edlp-d8-$(DATE_NOW)-local.sql