build_docker.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. buildscript {
  2. repositories {
  3. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/'}
  4. }
  5. }
  6. plugins {
  7. id 'java'
  8. id 'com.google.cloud.tools.jib' version "${jibGradlePluginVersion}"
  9. id 'org.springframework.boot' version "${springBootVersion}"
  10. }
  11. apply plugin: 'com.google.cloud.tools.jib'
  12. description = "maxkey-web-maxkey"
  13. //docker
  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
  30. image = "${jibToImage}/maxkey"
  31. tags = ["${project.version}".toString(), 'latest']
  32. auth {
  33. username = "${jibToAuthUsername}"
  34. password = "${jibToAuthPassword}"
  35. }
  36. }
  37. container {
  38. mainClass = "org.dromara.maxkey.MaxKeyApplication"
  39. jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=9527','-Duser.timezone=Asia/Shanghai']
  40. ports = ['9527']
  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-social")
  55. implementation project(":maxkey-authentications:maxkey-authentication-provider")
  56. implementation project(":maxkey-protocols:maxkey-protocol-authorize")
  57. implementation project(":maxkey-protocols:maxkey-protocol-cas")
  58. implementation project(":maxkey-protocols:maxkey-protocol-extendapi")
  59. implementation project(":maxkey-protocols:maxkey-protocol-formbased")
  60. implementation project(":maxkey-protocols:maxkey-protocol-tokenbased")
  61. implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
  62. implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0")
  63. implementation project(":maxkey-protocols:maxkey-protocol-jwt")
  64. }