35 lines
959 B
Bash
Executable File
35 lines
959 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
echo "Executing 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.env"
|
|
|
|
|
|
helm upgrade --install nextcloud nextcloud/nextcloud \
|
|
--values ./deploy/app/helm-values.yaml \
|
|
--set externalDatabase.user=${MARIADB_USER} \
|
|
--set externalDatabase.password=${MARIADB_PASSWORD} \
|
|
--set externalDatabase.database=${MARIADB_DATABASE} \
|
|
--set nextcloud.host=${NEXTCLOUD_HOST} \
|
|
--set nextcloud.username=${NEXTCLOUD_USERNAME} \
|
|
--set nextcloud.password=${NEXTCLOUD_PASSWORD} \
|
|
--namespace cloud-limbosolutions-com
|
|
|