Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. # export DATE_NOW
  13. pull:
  14. docker-compose pull
  15. build:
  16. 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)
  17. buildnc:
  18. 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)
  19. build_php:
  20. 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
  21. buildnc_php:
  22. 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
  23. buildnc_mysql:
  24. 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) mysql
  25. downbuildup: down build up
  26. up:
  27. docker-compose up -d
  28. ps:
  29. docker-compose ps
  30. logs:
  31. docker-compose logs -f
  32. restart_php:
  33. docker-compose restart php
  34. d9_maj_config: d9_crd d9_ext d9_composer_install d9_updb d9_cim d9_sync_struct d9_cr d9_pag
  35. d9_crd:
  36. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush cache-clear drush"
  37. d9_ext:
  38. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush cdi1 config/sync/core.extension.yml"
  39. d9_composer_install:
  40. docker exec eql-php-1 /bin/bash -c "composer install"
  41. d9_cr:
  42. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush cr"
  43. d9_updb:
  44. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush updb -y"
  45. d9_cim:
  46. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush config-import -y"
  47. d9_sync_struct:
  48. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush im --choice full && vendor/bin/drush ib --choice full & vendor/bin/drush it --choice full"
  49. d9_pag:
  50. docker exec eql-php-1 /bin/bash -c "vendor/bin/drush pag all canonical_entities:node && vendor/bin/drush pag all canonical_entities:taxonomy_term"
  51. down:
  52. docker-compose down
  53. exec_nginx:
  54. docker exec -it eql-nginx-1 bash
  55. exec_php:
  56. docker exec -it eql-php-1 bash
  57. exec_mysql:
  58. docker exec -it eql-mysql-1 bash
  59. dump_d9_db:
  60. docker exec eql-mysql-1 sh -c 'exec mysqldump -uroot -peql eql' > ./ressources/eql-$(DATE_NOW)-local.sql