fix(ci): 前端容器改为 Dockerfile 镜像打包,去除宿主机路径挂载依赖
This commit is contained in:
+1
-4
@@ -8,11 +8,8 @@ services:
|
|||||||
- "8089:8080"
|
- "8089:8080"
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
image: nginx:alpine
|
build: ./frontend
|
||||||
container_name: blog-frontend
|
container_name: blog-frontend
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8088:80"
|
- "8088:80"
|
||||||
volumes:
|
|
||||||
- ./frontend:/usr/share/nginx/html
|
|
||||||
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
COPY index.html /usr/share/nginx/html/index.html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Reference in New Issue
Block a user