update docker build
This commit is contained in:
@@ -3,7 +3,7 @@ FROM eclipse-temurin:8-jre
|
|||||||
RUN mkdir -p /opt/aj-report/logs
|
RUN mkdir -p /opt/aj-report/logs
|
||||||
|
|
||||||
WORKDIR /opt/aj-report
|
WORKDIR /opt/aj-report
|
||||||
|
unzip build/aj-report-*.zip ./build
|
||||||
COPY ../../build/aj-report-1.3.0.RELEASE /opt/aj-report
|
COPY build/aj-report-1.3.0.RELEASE /opt/aj-report
|
||||||
|
|
||||||
CMD /opt/aj-report/bin/start.sh && tail -f /opt/aj-report/logs/aj-report.log
|
CMD /opt/aj-report/bin/start.sh && tail -f /opt/aj-report/logs/aj-report.log
|
||||||
16
build.sh
16
build.sh
@@ -11,6 +11,9 @@ echo "build web"
|
|||||||
cd $BuildDir/report-ui
|
cd $BuildDir/report-ui
|
||||||
echo "npm install"
|
echo "npm install"
|
||||||
npm install
|
npm install
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
npm install --registry=https://mirrors.cloud.tencent.com/npm/
|
||||||
|
fi
|
||||||
echo "cp echarts map js"
|
echo "cp echarts map js"
|
||||||
cp -r node_modules_echarts_need/* node_modules/echarts/
|
cp -r node_modules_echarts_need/* node_modules/echarts/
|
||||||
echo "npm run build"
|
echo "npm run build"
|
||||||
@@ -19,16 +22,17 @@ npm run build:prod
|
|||||||
echo "publish web to springboot src/main/resources/static"
|
echo "publish web to springboot src/main/resources/static"
|
||||||
rm -rf $BuildDir/report-core/src/main/resources/static
|
rm -rf $BuildDir/report-core/src/main/resources/static
|
||||||
mkdir -p $BuildDir/report-core/src/main/resources/static
|
mkdir -p $BuildDir/report-core/src/main/resources/static
|
||||||
mv $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/
|
if [ ! -e "$BuildDir/report-ui/dist" ];then
|
||||||
|
echo "no build dist exist,web-build-failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
cp $BuildDir/report-ui/dist/* $BuildDir/report-core/src/main/resources/static/
|
||||||
echo "build springboot"
|
echo "build springboot"
|
||||||
cd $BuildDir/report-core
|
cd $BuildDir/report-core
|
||||||
echo "mvn clean"
|
echo "mvn clean package"
|
||||||
mvn clean
|
mvn clean package -Dmaven.test.skip=true
|
||||||
echo ""
|
|
||||||
echo "mvn package"
|
|
||||||
mvn package -Dmaven.test.skip=true
|
|
||||||
|
|
||||||
echo "zip finish in build dir"
|
echo "zip finish in build dir"
|
||||||
if [ ! -d "$BuildDir/build" ]; then
|
if [ ! -d "$BuildDir/build" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user