chore: 并入 iotlcm-admin-ui 历史到 admin-ui/(原提交 f305eab)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
dist
|
||||
.git
|
||||
.gitignore
|
||||
README.md
|
||||
.env.local
|
||||
*.zip
|
||||
@@ -0,0 +1,32 @@
|
||||
# 基础镜像仓库。默认使用 Docker Hub 官方镜像;内网环境可替换为自己的仓库:
|
||||
# docker build --build-arg BASE_REGISTRY=harbor.example.com/library ...
|
||||
ARG BASE_REGISTRY=docker.io/library
|
||||
|
||||
FROM ${BASE_REGISTRY}/node:24-alpine AS builder
|
||||
|
||||
LABEL stage=gobuilder
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY . .
|
||||
|
||||
WORKDIR /build/vue
|
||||
|
||||
ENV COREPACK_NPM_REGISTRY=https://registry.npmmirror.com
|
||||
|
||||
RUN npm config set registry https://registry.npmmirror.com/ && \
|
||||
corepack enable && \
|
||||
corepack prepare pnpm@10.22.0 --activate && \
|
||||
pnpm config set registry https://registry.npmmirror.com/
|
||||
RUN CI=true pnpm install --frozen-lockfile
|
||||
RUN CI=true pnpm build
|
||||
|
||||
FROM ${BASE_REGISTRY}/nginx:1.30-alpine AS alpine
|
||||
|
||||
COPY --from=builder /build/vue/apps/web-antd/dist /usr/share/nginx/html
|
||||
COPY vue/build/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露80端口
|
||||
EXPOSE 80
|
||||
# 启动nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -0,0 +1,13 @@
|
||||
# 基础镜像仓库。默认使用 Docker Hub 官方镜像;内网环境可替换为自己的仓库:
|
||||
# docker build --build-arg BASE_REGISTRY=harbor.example.com/library ...
|
||||
ARG BASE_REGISTRY=docker.io/library
|
||||
|
||||
FROM ${BASE_REGISTRY}/nginx:1.30-alpine AS alpine
|
||||
|
||||
COPY vue/apps/web-antd/dist /usr/share/nginx/html
|
||||
COPY vue/build/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露80端口
|
||||
EXPOSE 80
|
||||
# 启动nginx
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
@@ -0,0 +1,37 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
# root /data/app/iotlcmadmin-web-ui/dist;
|
||||
index index.html;
|
||||
|
||||
charset utf-8;
|
||||
client_max_body_size 200m;
|
||||
access_log /data/logs/nginx/access_iotlcmadminui.log;
|
||||
error_log /data/logs/nginx/error_iotlcmadminui.log;
|
||||
# 解决history路由刷新404
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
location /api/ {
|
||||
proxy_set_header Connection upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_http_version 1.1;
|
||||
chunked_transfer_encoding off;
|
||||
proxy_pass http://iotlcm-admin-svr:8008/api/v1/;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
# 开启gzip压缩
|
||||
gzip on;
|
||||
gzip_types text/plain application/javascript text/css application/json;
|
||||
|
||||
location /upload/ {
|
||||
alias /data/app/iotlcmadmin-web-svc/upload/;
|
||||
}
|
||||
|
||||
location /app/upload/ {
|
||||
alias /data/app/iotlcmadmin-web-svc/upload/;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user