fix: use init-container instead of postStart hook
This commit is contained in:
parent
80fa13b63f
commit
bdba4f3e34
@ -13,31 +13,34 @@ spec:
|
||||
labels:
|
||||
app: element-web-docs
|
||||
spec:
|
||||
initContainers:
|
||||
- name: copy-files
|
||||
image: busybox:1.36
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
mkdir -p /html/docs/setup
|
||||
cp /config/README-Element-Setup.md /html/docs/setup/
|
||||
cp /config/element-setup-windows.cmd /html/docs/setup/
|
||||
cp /config/element-setup-macos.command /html/docs/setup/
|
||||
cp /config/element-setup-linux.sh /html/docs/setup/
|
||||
chmod 644 /html/docs/setup/*
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: html
|
||||
mountPath: /html
|
||||
containers:
|
||||
- name: nginx
|
||||
image: nginx:1.26-alpine
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: nginx-conf
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: nginx.conf
|
||||
- name: html
|
||||
mountPath: /usr/share/nginx/html
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
mkdir -p /usr/share/nginx/html/docs/setup
|
||||
cp /config/README-Element-Setup.md /usr/share/nginx/html/docs/setup/
|
||||
cp /config/element-setup-windows.cmd /usr/share/nginx/html/docs/setup/
|
||||
cp /config/element-setup-macos.command /usr/share/nginx/html/docs/setup/
|
||||
cp /config/element-setup-linux.sh /usr/share/nginx/html/docs/setup/
|
||||
chmod 644 /usr/share/nginx/html/docs/setup/*
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user