build_docker.gradle 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. }
  18. to {
  19. //https://registry.hub.docker.com/repository/docker/maxkeytop/maxkey
  20. image = "${jibToImage}/maxkey"
  21. tags = ["${project.version}".toString(), 'latest']
  22. auth {
  23. username = "${jibToAuthUsername}"
  24. password = "${jibToAuthPassword}"
  25. }
  26. }
  27. container {
  28. mainClass = "org.maxkey.MaxKeyApplication"
  29. jvmFlags = ['-Dfile.encoding=utf-8', '-Dserver.port=443','-Duser.timezone=Asia/Shanghai']
  30. ports = ['443']
  31. }
  32. }
  33. //build.configure { finalizedBy jib }
  34. dependencies {
  35. implementation project(":maxkey-common")
  36. implementation project(":maxkey-core")
  37. implementation project(":maxkey-persistence")
  38. implementation project(":maxkey-authentications:maxkey-authentication-core")
  39. implementation project(":maxkey-authentications:maxkey-authentication-social")
  40. implementation project(":maxkey-authentications:maxkey-authentication-captcha")
  41. implementation project(":maxkey-authentications:maxkey-authentication-otp")
  42. implementation project(":maxkey-protocols:maxkey-protocol-authorize")
  43. implementation project(":maxkey-protocols:maxkey-protocol-cas")
  44. implementation project(":maxkey-protocols:maxkey-protocol-extendapi")
  45. implementation project(":maxkey-protocols:maxkey-protocol-formbased")
  46. implementation project(":maxkey-protocols:maxkey-protocol-tokenbased")
  47. implementation project(":maxkey-protocols:maxkey-protocol-oauth-2.0")
  48. implementation project(":maxkey-protocols:maxkey-protocol-saml-2.0")
  49. implementation project(":maxkey-protocols:maxkey-protocol-jwt")
  50. implementation project(":maxkey-webs:maxkey-web-resources")
  51. }