Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. pull:
  12. docker-compose pull
  13. build:
  14. 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)
  15. buildnc:
  16. 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)
  17. downbuildup: down build up
  18. up:
  19. docker-compose up -d
  20. ps:
  21. docker-compose ps
  22. logs:
  23. docker-compose logs -f
  24. api_maj_config: api_crd api_composer_install api_updb api_cim api_cr
  25. api_crd:
  26. docker exec enfrancais_api_1 /bin/bash -c "drush cache-clear drush"
  27. api_cr:
  28. docker exec enfrancais_api_1 /bin/bash -c "drush cr"
  29. api_updb:
  30. docker exec enfrancais_api_1 /bin/bash -c "drush updb -y"
  31. api_cim:
  32. docker exec enfrancais_api_1 /bin/bash -c "drush config-import -y"
  33. api_composer_install:
  34. docker exec enfrancais_api_1 /bin/bash -c "composer install --no-dev"
  35. down:
  36. docker-compose down
  37. exec_api:
  38. docker exec -it enfrancais_api_1 bash
  39. exec_app:
  40. docker exec -it enfrancais_app_1 sh
  41. exec_mysql:
  42. docker exec -it enfrancais_mysql_1 bash