feat: 完成了docker部署的配置
parent
a2086975f4
commit
ed964bc78c
|
@ -0,0 +1,16 @@
|
||||||
|
FROM azul/zulu-openjdk-alpine:17-jre-headless-latest
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ARG EXTRACTED=build/extracted
|
||||||
|
|
||||||
|
COPY ${EXTRACTED}/dependencies ./
|
||||||
|
COPY ${EXTRACTED}/spring-boot-loader/ ./
|
||||||
|
COPY ${EXTRACTED}/snapshot-dependencies/ ./
|
||||||
|
COPY ${EXTRACTED}/application/ ./
|
||||||
|
|
||||||
|
VOLUME /app/logs/
|
||||||
|
ENV ENV prod
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
ENTRYPOINT ["java","org.springframework.boot.loader.JarLauncher"]
|
|
@ -0,0 +1,8 @@
|
||||||
|
.\gradlew.bat bootJar
|
||||||
|
|
||||||
|
java -Djarmode=layertools `
|
||||||
|
-jar .\build\libs\AicsKnowledgeBase_main-1.0.0.jar `
|
||||||
|
extract --destination build/extracted
|
||||||
|
|
||||||
|
docker build -f .\Dockerfile -t auto/aics_main:latest .
|
||||||
|
pause
|
|
@ -12,7 +12,7 @@ sa-token:
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
url: jdbc:postgresql://localhost:5432/aics_knowledge?useUnicode=true
|
url: jdbc:postgresql://db:5432/aics_knowledge?useUnicode=true
|
||||||
username: aics_backend
|
username: aics_backend
|
||||||
password: 123456
|
password: 123456
|
||||||
kafka:
|
kafka:
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
spring:
|
spring:
|
||||||
profiles:
|
profiles:
|
||||||
active: prod
|
active: ${ENV:dev}
|
Loading…
Reference in New Issue