43 lines
1.5 KiB
Bash
Executable File
43 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
echo "Executing nextcloud app deploy."
|
|
kubectl kustomize deploy/app | kubectl apply -f -
|
|
|
|
load_env_file() {
|
|
local file="$1"
|
|
|
|
if [ -f "$file" ]; then
|
|
echo "Loading environment variables from: $file"
|
|
set -a
|
|
. "$file"
|
|
set +a
|
|
else
|
|
echo "Skipping missing env file: $file"
|
|
fi
|
|
}
|
|
|
|
#helm repo add nextcloud https://nextcloud.github.io/helm/ --force-update
|
|
|
|
load_env_file "deploy/app/.env.d/nextcloud-mariadb.env"
|
|
load_env_file "deploy/app/.env.d/nextcloud-secrets.env"
|
|
load_env_file "deploy/app/.env.d/redis.env"
|
|
|
|
helm upgrade --install nextcloud nextcloud/nextcloud --version "9.0" \
|
|
--values ./deploy/app/nextcloud-helm-values.yaml \
|
|
--set externalDatabase.user=${MARIADB_USER:?Missing MARIADB_USER} \
|
|
--set externalDatabase.password=${MARIADB_PASSWORD:?Missing MARIADB_PASSWORD} \
|
|
--set externalDatabase.database=${MARIADB_DATABASE:?Missing MARIADB_DATABASE} \
|
|
--set nextcloud.host=${NEXTCLOUD_HOST:?Missing NEXTCLOUD_HOST} \
|
|
--set nextcloud.username=${NEXTCLOUD_USERNAME:?Missing NEXTCLOUD_USERNAME} \
|
|
--set nextcloud.password=${NEXTCLOUD_PASSWORD:?Missing NEXTCLOUD_PASSWORD} \
|
|
--namespace cloud-limbosolutions-com
|
|
|
|
helm repo add bitnami https://charts.bitnami.com/bitnami
|
|
|
|
helm upgrade --install nextcloud-redis bitnami/redis --version "25.3" \
|
|
--values ./deploy/app/redis-helm-values.yaml \
|
|
--set auth.password="${REDIS_PASSWORD:?Missing REDIS_PASSWORD}" \
|
|
--namespace cloud-limbosolutions-com
|
|
|
|
|
|
|