1
0

docker-compose-local.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #
  2. # Copyright (c) 2019 Of Him Code Technology Studio
  3. # Jpom is licensed under Mulan PSL v2.
  4. # You can use this software according to the terms and conditions of the Mulan PSL v2.
  5. # You may obtain a copy of Mulan PSL v2 at:
  6. # http://license.coscl.org.cn/MulanPSL2
  7. # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  8. # See the Mulan PSL v2 for more details.
  9. #
  10. version: '3.8'
  11. services:
  12. server:
  13. env_file:
  14. - env-release.env
  15. image: jpomdocker/jpom:server-${JPOM_VERSION}
  16. build:
  17. dockerfile: ./modules/server/Dockerfile
  18. context: .
  19. args:
  20. JPOM_VERSION: ${JPOM_VERSION}
  21. environment:
  22. "JPOM_SERVER_TEMP_TOKEN": ${SERVER_TOKEN}
  23. volumes:
  24. - jpom-server-data:/usr/local/jpom-server/data
  25. - jpom-server-logs:/usr/local/jpom-server/logs
  26. - jpom-server-conf:/usr/local/jpom-server/conf
  27. ports:
  28. - "2122:2122"
  29. hostname: server
  30. agent01:
  31. env_file:
  32. - env-release.env
  33. image: jpomdocker/jpom:agent-${JPOM_VERSION}
  34. build:
  35. dockerfile: ./modules/agent/Dockerfile
  36. context: .
  37. args:
  38. JPOM_VERSION: ${JPOM_VERSION}
  39. RUN_ARG: --auto-push-to-server 'http://server:2122/api/node/receive_push?token=${SERVER_TOKEN}&workspaceId=DEFAULT'
  40. volumes:
  41. - jpom-agent01:/usr/local/jpom-agent
  42. ports:
  43. - "2123:2123"
  44. depends_on:
  45. - server
  46. hostname: agent01
  47. agent02:
  48. env_file:
  49. - env-release.env
  50. image: jpomdocker/jpom:agent-${JPOM_VERSION}
  51. build:
  52. dockerfile: ./modules/agent/Dockerfile
  53. context: .
  54. args:
  55. JPOM_VERSION: ${JPOM_VERSION}
  56. RUN_ARG: --auto-push-to-server 'http://server:2122/api/node/receive_push?token=${SERVER_TOKEN}&workspaceId=DEFAULT'
  57. volumes:
  58. - jpom-agent02:/usr/local/jpom-agent
  59. ports:
  60. - "2124:2123"
  61. depends_on:
  62. - server
  63. hostname: agent02
  64. volumes:
  65. jpom-agent01:
  66. jpom-agent02:
  67. jpom-server-data:
  68. jpom-server-logs:
  69. jpom-server-conf: