add workflow (#552)

This commit is contained in:
Jared Tan
2024-06-18 09:29:00 +08:00
committed by GitHub
parent f81cae18ee
commit ed23d6d930
7 changed files with 176 additions and 51 deletions

19
docker/Dockerfile-UI Normal file
View File

@@ -0,0 +1,19 @@
# ================================= UI ================================
#FROM docker.m.daocloud.io/node:16.0.0-alpine AS builder
ARG NODE_IMAGE_VERSION=16.20
FROM node:${NODE_IMAGE_VERSION} AS builder
LABEL description="cmdb-ui"
COPY cmdb-ui /data/apps/cmdb-ui
WORKDIR /data/apps/cmdb-ui
RUN sed -i "s#http://127.0.0.1:5000##g" .env && yarn install && yarn build
FROM docker.m.daocloud.io/library/nginx:1.21.4 AS cmdb-ui
#FROM nginx:1.21.4 AS cmdb-ui
RUN mkdir /etc/nginx/html && rm -f /etc/nginx/conf.d/default.conf
COPY --from=builder /data/apps/cmdb-ui/dist /etc/nginx/html/