ci: 改为单 job 直接构建部署,消除 Gitea Registry 依赖
ci.yml: 合并为单 deploy job,runs-on aliyun,apk 安装工具,docker compose up -d --build 直接构建 docker-compose.prod.yml: backend/worker/frontend 改用 build: 块,移除 nginx bind mount frontend/Dockerfile: 添加 ARG NGINX_CONFIG,生产构建传入 nginx.prod.conf 进镜像
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
# docker build -f frontend/Dockerfile -t feedsystem-frontend .
|
||||
#
|
||||
|
||||
ARG NGINX_CONFIG=nginx.conf
|
||||
|
||||
FROM node:24-alpine AS build
|
||||
WORKDIR /src
|
||||
|
||||
@@ -15,7 +17,8 @@ COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.27-alpine
|
||||
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
ARG NGINX_CONFIG
|
||||
COPY frontend/${NGINX_CONFIG} /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /src/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user