Skip to content
Snippets Groups Projects
Commit 1e79eeb6 authored by yms's avatar yms
Browse files

feat: 更新打包文件

parent 35d36dce
Branches
Tags 1.0.0_1028_b1
Loading
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"]
#!/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
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;
}
}
#!/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;'
......@@ -49,7 +49,6 @@
border-radius: 15px;
background: rgba(255, 255, 255, 0.8);
margin-bottom: 20px;
padding: 20px;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment