Makefile 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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
  23. upd:
  24. docker-compose up -d
  25. up_basex:
  26. docker-compose up -d basex
  27. up_client:
  28. docker-compose up -d client
  29. restart_basex:
  30. docker-compose restart basex
  31. restart_client:
  32. docker-compose restart client
  33. # upbuild:
  34. # docker-compose up -d --build
  35. ps:
  36. docker-compose ps
  37. logs:
  38. docker-compose logs -f
  39. logs_basex:
  40. docker-compose logs basex -f
  41. logs_client:
  42. docker-compose logs client -f
  43. down:
  44. docker-compose down
  45. exec_client:
  46. docker exec -it gdp-client-1 sh
  47. exec_basex:
  48. docker exec -it gdp-basex-1 sh
  49. exec_basex_root:
  50. docker exec -u 0 -it gdp-basex-1 sh