mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-03-04 01:38:41 +08:00
put the database into a subpath
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
bf5b7f0f56
commit
c6492ef05c
1 changed files with 6 additions and 0 deletions
|
@ -61,6 +61,7 @@ cat << EOL > /tmp/initcontainers.database
|
|||
command:
|
||||
- chown
|
||||
- 999:999
|
||||
- "-R"
|
||||
volumeMountsInitContainer:
|
||||
EOL
|
||||
# shellcheck disable=SC1083
|
||||
|
@ -80,6 +81,11 @@ for variable in "${DEPLOYMENTS[@]}"; do
|
|||
if [ "$volumeName" != "nextcloud-aio-nextcloud-data" ]; then
|
||||
sed -i "/^.*volumeMountsInitContainer:/i\ \ \ \ \ \ \ \ \ \ \ \ - /$volumeName" "$variable"
|
||||
sed -i "/volumeMountsInitContainer:/a\ \ \ \ \ \ \ \ \ \ \ \ - name: $volumeName\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ mountPath: /$volumeName" "$variable"
|
||||
# Workaround for the database volume
|
||||
if [ "$volumeName" = nextcloud-aio-database ]; then
|
||||
sed -i "/mountPath: \/var\/lib\/postgresql\/data/a\ \ \ \ \ \ \ \ \ \ \ \ \ \ subPath: data" "$variable"
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
sed -i "s|volumeMountsInitContainer|volumeMounts|" "$variable"
|
||||
|
|
Loading…
Reference in a new issue