提交 9802f6a9 作者: 余乾开

feat(config):volume

上级 eb8a64ed
...@@ -10,6 +10,7 @@ RUN npm run build ...@@ -10,6 +10,7 @@ RUN npm run build
# nginx # nginx
FROM nginx:alpine as production FROM nginx:alpine as production
VOLUME ["/var/log/nginx/"]
ENV NODE_ENV production ENV NODE_ENV production
# Set working directory to nginx asset directory # Set working directory to nginx asset directory
COPY --from=builder /app/dist /usr/share/nginx/html COPY --from=builder /app/dist /usr/share/nginx/html
......
...@@ -18,9 +18,16 @@ spec: ...@@ -18,9 +18,16 @@ spec:
containers: containers:
- name: admin - name: admin
image: REGISTRY/NAMESPACE/IMAGE:TAG image: REGISTRY/NAMESPACE/IMAGE:TAG
volumeMounts:
- name: log-of-nginx
mountPath: /var/log/nginx
resources: resources:
limits: limits:
memory: 512Mi memory: 512Mi
cpu: 100m cpu: 100m
ports: ports:
- containerPort: 80 - containerPort: 80
volumes:
- name: log-of-nginx
hostPath:
path: /var/log/nginx
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论