Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  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. buildnginx:
  23. 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) nginx
  24. buildnginxnc:
  25. 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) nginx
  26. buildnpm:
  27. 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) npm
  28. buildnpmnc:
  29. 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) npm
  30. up:
  31. docker-compose up -d
  32. upbuild:
  33. docker-compose up -d --build
  34. ps:
  35. docker-compose ps
  36. logs:
  37. docker-compose logs -f
  38. logs_redis:
  39. docker-compose logs -f redis
  40. down:
  41. docker-compose down
  42. restart_solr:
  43. docker-compose restart solr-new
  44. restart_redis:
  45. docker-compose restart redis
  46. restart_php:
  47. docker-compose restart php
  48. restart_npm :
  49. docker-compose restart npm
  50. exec_php:
  51. docker exec -it materiod8-php-1 bash
  52. exec_nginx:
  53. docker exec -it materiod8-nginx-1 bash
  54. exec_npm:
  55. docker exec -it materiod8-npm-1 sh
  56. exec_mysql:
  57. docker exec -it materiod8-mysql-1 bash
  58. exec_solr:
  59. docker exec -it materiod8-solr-new-1 bash
  60. exec_solrlegacy:
  61. docker exec -it materiod8-solr-legacy-1 bash
  62. phplegacy:
  63. docker exec -it materiod8-php-legacy-1 bash
  64. redis:
  65. docker exec -it materiod8-redis-1 bash
  66. update_solr_conf:
  67. bin/update_solr_config.sh
  68. dump_d8_db:
  69. docker exec materiod8-mysql-1 sh -c 'exec mysqldump -uroot -pmaterio materio_d8' > ./ressources/materio-d8-$(DATE_NOW)-local.sql
  70. sish:
  71. ssh -p 2222 -R materio:80:dev:8890 CT-sish.me