Makefile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. export USER_UID
  8. export USER_UNAME
  9. export USER_GID
  10. export USER_GNAME
  11. build:
  12. 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)
  13. buildnc:
  14. 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)
  15. up:
  16. docker-compose up -d
  17. upbuild:
  18. docker-compose up -d --build
  19. ps:
  20. docker-compose ps
  21. logs:
  22. docker-compose logs -f
  23. down:
  24. docker-compose down
  25. maj_config: crd composer_install updb cim structsync cr
  26. crd:
  27. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2021 cache-clear drush"
  28. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2024 cache-clear drush"
  29. composer_install:
  30. docker exec popsucoloque-php-1 /bin/bash -c "composer install --no-dev"
  31. updb:
  32. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2021 updb -y"
  33. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2024 updb -y"
  34. cim:
  35. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2021 config-import -y"
  36. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2024 config-import -y"
  37. structsync:
  38. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2024 ia --choice="safe" -y"
  39. cr:
  40. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2021 cr"
  41. docker exec popsucoloque-php-1 /bin/bash -c "vendor/bin/drush @self.colloque2024 cr"
  42. exec_php:
  43. docker exec -it popsucoloque-php-1 bash
  44. exec_nginx:
  45. docker exec -it popsucoloque-nginx-1 bash
  46. exec_mysql:
  47. docker exec -it popsucoloque-mysql-1 bash
  48. restart_php:
  49. docker-compose restart php
  50. restart_nginx:
  51. docker-compose restart nginx
  52. dump_db:
  53. docker exec popsucoloque-mysql-1 sh -c 'exec mysqldump -uroot -ppopsu colloque21' > ./ressources/colloque21-$(DATE_NOW)-local.sql
  54. docker exec popsucoloque-mysql-1 sh -c 'exec mysqldump -uroot -ppopsu colloque24' > ./ressources/colloque24-$(DATE_NOW)-local.sql