更新nginx yaml
This commit is contained in:
parent
fa6d686acf
commit
8662280849
@ -116,9 +116,13 @@ spec:
|
||||
image: $HARBOR_REGISTRY/test/nginx:$NGINX_IMAGE_TAG
|
||||
imagePullPolicy: Always
|
||||
|
||||
# 添加明确的启动命令,确保使用正确的配置文件
|
||||
command: ["/usr/local/nginx/sbin/nginx"]
|
||||
args: ["-c", "/etc/nginx/nginx.conf", "-g", "daemon off;"]
|
||||
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080 # 修改为与nginx.conf中一致的端口
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
|
||||
# 环境变量
|
||||
@ -164,12 +168,10 @@ spec:
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 5
|
||||
|
||||
# 挂载配置文件
|
||||
# 挂载配置文件 - 修改挂载方式
|
||||
volumeMounts:
|
||||
- name: nginx-config-volume
|
||||
mountPath: /etc/nginx/nginx.conf
|
||||
subPath: nginx.conf
|
||||
readOnly: true
|
||||
mountPath: /etc/nginx # 修改为目录挂载而非文件挂载
|
||||
- name: nginx-cache
|
||||
mountPath: /var/cache/nginx
|
||||
- name: nginx-run
|
||||
|
Loading…
x
Reference in New Issue
Block a user