From 69f8c7c9d57d71375ecbb1bfc55b4e145b1d4a5b Mon Sep 17 00:00:00 2001 From: ls Date: Sat, 12 Oct 2024 00:56:11 +0800 Subject: [PATCH] update --- .gitlab-ci.yml | 18 +++++++++--------- Dockerfile | 19 +++++++++---------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8c7493..eb835bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,15 +19,15 @@ stages: # List of stages for jobs, and their order of execution - deploy -build-job: # This job runs in the build stage, which runs first. - stage: deploy - script: - - echo "Compiling the code..." - - echo "I'm..." $(whoami) - - mvn -s ./settings.xml -DskipTests=true clean install - - echo "Compile complete." - - mkdir -p /home/gitlab-runner/public/physical -# - cp physical-launcher/target/physical-launcher-3.7.0.jar /home/gitlab-runner/public/physical +#build-job: # This job runs in the build stage, which runs first. +# stage: deploy +# script: +# - echo "Compiling the code..." +# - echo "I'm..." $(whoami) +# - mvn -s ./settings.xml -DskipTests=true clean install +# - echo "Compile complete." +# - mkdir -p /home/gitlab-runner/public/physical +## - cp physical-launcher/target/physical-launcher-3.7.0.jar /home/gitlab-runner/public/physical diff --git a/Dockerfile b/Dockerfile index 7307c80..30c8056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ #FROM bellsoft/liberica-openjdk-debian:17 -#FROM maven:3.9.8-eclipse-temurin-17 AS build -# -#WORKDIR /app -# -#COPY settings.xml /root/.m2/settings.xml -# -#ADD . /app -#RUN mvn package -DskipTests=true clean install +FROM maven:3.9.8-eclipse-temurin-17 AS build + +WORKDIR /app + +COPY settings.xml /root/.m2/settings.xml + +ADD . /app +RUN mvn package -DskipTests=true clean install @@ -17,7 +17,6 @@ WORKDIR /app EXPOSE 8080 #ADD ./src/main/resources/jeecg ./config/jeecg -#COPY --from=build /app/physical-launcher/target/physical-launcher-3.7.0.jar physical-launcher-3.7.0.jar -COPY ./physical-launcher/target/physical-launcher-3.7.0.jar /app/ +COPY --from=build /app/physical-launcher/target/physical-launcher-3.7.0.jar physical-launcher-3.7.0.jar CMD sleep 60;java -Djava.security.egd=file:/dev/./urandom -jar physical-launcher-3.7.0.jar --spring.profiles.active=prod \ No newline at end of file