This commit is contained in:
whz 2024-06-04 09:00:34 +08:00
parent 443bdd7820
commit c83a477c7a

View File

@ -11,13 +11,12 @@ WORKDIR /app
# 将Gradle的配置文件复制到镜像中
COPY gradlew .
COPY gradle gradle
COPY build.gradle .
COPY settings.gradle .
COPY src src
# 构建应用
RUN gradle bootJar
RUN /app/gradlew bootJar
# 使用官方的Java运行时作为最终的运行环境
FROM openjdk:17-jdk-slim
@ -75,7 +74,8 @@ services:
- "8080:8080"
depends_on:
- db
environment:
- SPRING_PROFILES_ACTIVE=prod
volumes:
dbdata:
```