Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. buildncapp:
  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) app
  19. buildnginx:
  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) nginx
  21. buildncnginx:
  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) nginx
  23. downbuildup: down build up
  24. up:
  25. docker-compose up -d
  26. ps:
  27. docker-compose ps
  28. logs:
  29. docker-compose logs -f
  30. api_maj_config: api_crd api_composer_install api_updb api_cim api_cr
  31. api_crd:
  32. docker exec ouatterrir-api-1 /bin/bash -c "drush cache-clear drush"
  33. api_cr:
  34. docker exec ouatterrir-api-1 /bin/bash -c "drush cr"
  35. api_updb:
  36. docker exec ouatterrir-api-1 /bin/bash -c "drush updb -y"
  37. api_cim:
  38. docker exec ouatterrir-api-1 /bin/bash -c "drush config-import -y"
  39. api_composer_install:
  40. docker exec ouatterrir-api-1 /bin/bash -c "composer install --no-dev"
  41. down:
  42. docker-compose down
  43. exec_api:
  44. docker exec -it ouatterrir-api-1 bash
  45. restart_api:
  46. docker-compose restart api
  47. exec_app:
  48. docker exec -it ouatterrir-app-1 bash
  49. restart_app:
  50. docker-compose restart app
  51. exec_mysql:
  52. docker exec -it ouatterrir-mysql-1 bash
  53. restart_nginx:
  54. docker-compose restart nginx