diff --git a/builds/Dockerfile b/builds/Dockerfile index bb75b1aac..995db64f9 100644 --- a/builds/Dockerfile +++ b/builds/Dockerfile @@ -1,63 +1,20 @@ -FROM adoptopenjdk/openjdk11:latest +FROM registry.cn-hangzhou.aliyuncs.com/lrh-public/openjdk:8u222-jre-up LABEL Author="axzsd" \ Email="atva725@qq.com" \ - Description="cmx活动" + Description="创盈支付服务端" ENV SPRING_PROFILES_ACTIVE="dev" -ENV JAVA_OPTIONS "-Xms256m -Xmx530m \ +ENV JAVA_OPTIONS "-Xms800m -Xmx800m \ +-XX:+HeapDumpOnOutOfMemoryError \ -Dfile.encoding=UTF-8 \ -Djava.awt.headless=true \ -Dsun.net.client.defaultConnectTimeout=10000 \ -Dsun.net.client.defaultReadTimeout=30000" -#RUN apt-get update && apt-get install bash --only-upgrade \ -# && apt-get install libaprutil1 --only-upgrade \ -# && apt-get install coreutils --only-upgrade \ -# && apt-get install libgcc1 --only-upgrade \ -# && apt-get install gcc-6-base --only-upgrade \ -# && apt-get install libstdc++6 --only-upgrade \ -# && apt-get install multiarch-support --only-upgrade \ -# && apt-get install libc6 --only-upgrade \ -# && apt-get install libc-bin --only-upgrade \ -# && apt-get install libpng16-16 --only-upgrade \ -# && apt-get install unzip --only-upgrade \ -# && apt-get install mount --only-upgrade \ -# && apt-get install libsmartcols1 --only-upgrade \ -# && apt-get install libblkid1 --only-upgrade \ -# && apt-get install libfdisk1 --only-upgrade \ -# && apt-get install libmount1 --only-upgrade \ -# && apt-get install bsdutils --only-upgrade \ -# && apt-get install libuuid1 --only-upgrade \ -# && apt-get install util-linux --only-upgrade \ -# && apt-get install gnupg-agent --only-upgrade \ -# && apt-get install gpgv --only-upgrade \ -# && apt-get install dirmngr --only-upgrade \ -# && apt-get install gnupg --only-upgrade \ -# && apt-get install libtasn1-6 --only-upgrade \ -# && apt-get install ncurses-bin --only-upgrade \ -# && apt-get install libncursesw5 --only-upgrade \ -# && apt-get install ncurses-base --only-upgrade \ -# && apt-get install libtinfo5 --only-upgrade \ -# && apt-get install bash --only-upgrade \ -# && apt-get install wget --only-upgrade \ -# && apt-get install libsepol1 --only-upgrade \ -# && apt-get install perl-base --only-upgrade \ -# && apt-get install libpcre3 --only-upgrade \ -# && apt-get install git --only-upgrade \ -# && apt-get install git-man --only-upgrade \ -# && apt-get install libncurses5 --only-upgrade \ -# && apt-get install openssh-client --only-upgrade \ -# && apt-get install libperl5.24 --only-upgrade \ -# && apt-get install perl --only-upgrade \ -# && apt-get install perl-modules-5.24 --only-upgrade \ -# && apt-get install python --only-upgrade \ -# && apt-get install python-minimal --only-upgrade \ -# && apt-get install libpython-stdlib --only-upgrade \ -# && apt clean -WORKDIR /opt -COPY hound-server/target/hound-server.jar /opt/app.jar +WORKDIR /work/projects/yudao-server +COPY yudao-server/target/yudao-server.jar /opt/app.jar -EXPOSE 3001 +EXPOSE 48080 ENTRYPOINT exec java $JAVA_OPTIONS -jar -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} /opt/app.jar diff --git a/builds/Jenkinsfile b/builds/Jenkinsfile index a718d2c34..9f4a8b3f9 100644 --- a/builds/Jenkinsfile +++ b/builds/Jenkinsfile @@ -15,7 +15,7 @@ pipeline { stages { stage('Pull Code') { steps { - checkout([$class: 'GitSCM', branches: [[name: "$GIT_BRANCH"]], extensions: [], userRemoteConfigs: [[credentialsId: 'Hx-Deploy-Git', url: 'http://117.33.142.185:3000/epiboly/hound-server-parent.git']]]) + checkout([$class: 'GitSCM', branches: [[name: "$GIT_BRANCH"]], extensions: [cloneOption(depth: 1, noTags: true, reference: '', shallow: true)], userRemoteConfigs: [[credentialsId: 'Hx-Deploy-Git', url: 'http://117.33.142.185:3000/zenghuapei/cyywl_server.git']]]) } } diff --git a/builds/docker-compose-test.yml b/builds/docker-compose-test.yml index 14c10dcfe..267950ae4 100644 --- a/builds/docker-compose-test.yml +++ b/builds/docker-compose-test.yml @@ -8,21 +8,21 @@ services: environment: TZ: Asia/Shanghai SPRING_PROFILES_ACTIVE: test - volumes: - - /opt/logs/cmx:/opt/logs +# volumes: +# - /opt/logs/cyywl:/work/projects/yudao-server ulimits: nproc: 65535 nofile: soft: 20000 hard: 40000 ports: - - "3001:3001" + - "48080:48080" deploy: resources: limits: - memory: 600MB + memory: 800MB healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:3001/hound-api/actuator/health"] + test: ["CMD", "curl", "-f", "http://localhost:48080/cyyywl-api/actuator/health"] timeout: 30s interval: 45s retries: 3 \ No newline at end of file diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index e4cafd6a9..cc95bc1ea 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -1,5 +1,7 @@ server: port: 48080 + servlet: + context-path: /cyyywl-api --- #################### 数据库相关配置 ####################