diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..723e574c4b68c5222178c8b1b62ec70d1dc9e97e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM registry.hncy.info/nginx:1.27.2-bookworm + +WORKDIR /usr/src/app/ + +COPY ./config/nginx.conf /etc/nginx/conf.d/default.conf + +COPY ./dist /usr/share/nginx/html/ + +COPY ./docker_start.sh /usr/bin/docker_start.sh + +# COPY ./regist-to-eureka /opt/regist-to-eureka + +EXPOSE 80 + +RUN chmod +x /usr/bin/docker_start.sh + +CMD ["docker_start.sh"] diff --git a/builder.sh b/builder.sh new file mode 100755 index 0000000000000000000000000000000000000000..f84c68dda4b9225984371f3c12a9b70d69a027a2 --- /dev/null +++ b/builder.sh @@ -0,0 +1,21 @@ +#!/bin/bash +git checkout $gitTag + +repo=registry.hncy.info/hncy/cd-quality-of-urban-management +tag=${1:-$gitTag} +echo $tag +# git submodule update --init --recursive +# if [ ! -f regist-to-eureka/reg2eureka.sh ]; then +# exit 1 +# fi +rm -rf dist +# rm -rf node_modules +# rm -rf pnpm-lock.yaml +# pnpm i +# pnpm run build +npm install +npm run build:dev + +# docker buildx use desktop-linux +docker buildx build --platform linux/arm64,linux/amd64 -t $repo:$tag . --push + diff --git a/config/nginx.conf b/config/nginx.conf new file mode 100644 index 0000000000000000000000000000000000000000..d170430eca92aa7c9d7f4c78d328120f5df88d80 --- /dev/null +++ b/config/nginx.conf @@ -0,0 +1,24 @@ + server { + listen 80; + fastcgi_buffers 8 256k; + send_timeout 60; + gzip on; + gzip_min_length 1k; + gzip_comp_level 9; + gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + # 本地测试 + # root html/dist; + # 生产 + root /usr/share/nginx/html; + + location = /favicon.ico { + allow all; + } + + location / { + try_files $uri $uri/ /index.html; + } + +} diff --git a/docker_start.sh b/docker_start.sh new file mode 100644 index 0000000000000000000000000000000000000000..0b0efbdf9afb565b391ef13de82571413a7a2b55 --- /dev/null +++ b/docker_start.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# source utils.sh + +# replace $NGINX_DEFAULT_CONFIG PROXY_ +# replace "umi.*.js" WS_SERVER_URL /usr/share/nginx/html +# sed -i "s/PROXY_WEB_SERVICE/$PROXY_WEB_SERVICE/g" /etc/nginx/conf.d/default.conf + +# sed -i "s/PROXY_DISPATCH_SERVICE/$PROXY_DISPATCH_SERVICE/g" /etc/nginx/conf.d/default.conf + + +# bash -c "/usr/bin/reg2eureka.sh &" +nginx -g 'daemon off;' + + diff --git a/src/pages/SolidWaste/components/CleanRangeModal/components/TodayEvent/index.less b/src/pages/SolidWaste/components/CleanRangeModal/components/TodayEvent/index.less index 95f12450bb90e185cfc7977599dab9319482e35e..ddc9d4e48910ab0621ae5f80d68273a8cdbe6fcc 100644 --- a/src/pages/SolidWaste/components/CleanRangeModal/components/TodayEvent/index.less +++ b/src/pages/SolidWaste/components/CleanRangeModal/components/TodayEvent/index.less @@ -49,7 +49,6 @@ border-radius: 15px; background: rgba(255, 255, 255, 0.8); margin-bottom: 20px; - padding: 20px; }