build_docker.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. buildscript {
  2. repositories {
  3. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'}
  4. }
  5. }
  6. //docker
  7. plugins {
  8. id 'java'
  9. id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}"
  10. id 'org.springframework.boot' version "${springBootVersion}"
  11. }
  12. apply plugin: 'com.google.cloud.tools.jib'
  13. description = "maxkey-web-mgt"
  14. jib {
  15. from {
  16. image = "${jibFromImage}"
  17. platforms {
  18. platform {
  19. architecture = 'amd64'
  20. os = 'linux'
  21. }
  22. platform {
  23. architecture = 'arm64'
  24. os = 'linux'
  25. }
  26. }
  27. }
  28. to {
  29. //https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey-mgt
  30. image = "${jibToImage}/maxkey-mgt"
  31. tags = ["${project.version}".toString(), 'latest']
  32. auth {
  33. username = "${jibToAuthUsername}"
  34. password = "${jibToAuthPassword}"
  35. }
  36. }
  37. container {
  38. mainClass = "org.dromara.maxkey.MaxKeyMgtApplication"
  39. jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=9526','-Duser.timezone=Asia/Shanghai']
  40. ports = ['9526']
  41. }
  42. }
  43. //build.configure { finalizedBy jib }
  44. dependencies {
  45. implementation project(":maxkey-common")
  46. implementation project(":maxkey-core")
  47. implementation project(":maxkey-persistence")
  48. implementation project(":maxkey-starter:maxkey-starter-captcha")
  49. implementation project(":maxkey-starter:maxkey-starter-ip2location")
  50. implementation project(":maxkey-starter:maxkey-starter-otp")
  51. implementation project(":maxkey-starter:maxkey-starter-sms")
  52. implementation project(":maxkey-starter:maxkey-starter-web")
  53. implementation project(":maxkey-authentications:maxkey-authentication-core")
  54. implementation project(":maxkey-authentications:maxkey-authentication-provider")
  55. implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
  56. implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0")
  57. //synchronizers
  58. implementation project(":maxkey-synchronizers:maxkey-synchronizer")
  59. implementation project(":maxkey-synchronizers:maxkey-synchronizer-activedirectory")
  60. implementation project(":maxkey-synchronizers:maxkey-synchronizer-feishu")
  61. implementation project(":maxkey-synchronizers:maxkey-synchronizer-jdbc")
  62. implementation project(":maxkey-synchronizers:maxkey-synchronizer-ldap")
  63. implementation project(":maxkey-synchronizers:maxkey-synchronizer-workweixin")
  64. implementation project(":maxkey-synchronizers:maxkey-synchronizer-dingtalk")
  65. }