fix: use init-container instead of postStart hook
This commit is contained in:
parent
80fa13b63f
commit
bdba4f3e34
@ -13,31 +13,34 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: element-web-docs
|
app: element-web-docs
|
||||||
spec:
|
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:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.26-alpine
|
image: nginx:1.26-alpine
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
|
||||||
mountPath: /config
|
|
||||||
- name: nginx-conf
|
- name: nginx-conf
|
||||||
mountPath: /etc/nginx/conf.d/default.conf
|
mountPath: /etc/nginx/conf.d/default.conf
|
||||||
subPath: nginx.conf
|
subPath: nginx.conf
|
||||||
- name: html
|
- name: html
|
||||||
mountPath: /usr/share/nginx/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:
|
volumes:
|
||||||
- name: config
|
- name: config
|
||||||
configMap:
|
configMap:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user