Makefile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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: build_basex build_client
  12. build_basex:
  13. docker-compose build basex
  14. build_client:
  15. 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) client
  16. buildnc: buildnc_basex buildnc_client
  17. buildnc_basex:
  18. docker-compose build --pull --no-cache basex
  19. buildnc_client:
  20. 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) client
  21. up:
  22. docker-compose up -d
  23. up_basex:
  24. docker-compose up -d basex
  25. up_client:
  26. docker-compose up -d client
  27. restart_basex:
  28. docker-compose restart basex
  29. restart_client:
  30. docker-compose restart client
  31. # upbuild:
  32. # docker-compose up -d --build
  33. ps:
  34. docker-compose ps
  35. logs:
  36. docker-compose logs -f
  37. logs_basex:
  38. docker-compose logs basex -f
  39. logs_client:
  40. docker-compose logs client -f
  41. down:
  42. docker-compose down
  43. exec_client:
  44. docker exec -it gdp-client-1 sh
  45. exec_basex:
  46. docker exec -it gdp-basex-1 sh
  47. exec_basex_root:
  48. docker exec -u 0 -it gdp-basex-1 sh