Skip to content

boop-ninja/iac-nextcloud

Repository files navigation

iac-nextcloud

Deploy Nextcloud to Kubernetes

Setup

  1. git clone
  2. alter backend.tf as needed
  3. add terraform.tfvars.json with kube variables
  4. terraform init
  5. terraform apply

Upgrading database

Backup Database

kubectl -n $NAMESPACE exec -it -c nextcloud-database $CONTAINER -- /usr/bin/pg_dumpall -U nextcloud > dumpfile

Change Variable

change: database_image to be the postgresql version you wish.

Import Data

# On System
kubectl -n $NAMESPACE exec -it -c nextcloud-database $CONTAINER -- "$(zsh | bash | sh)"

# In Container
createdb -U nextcloud nextcloud

# On System
kubectl -n $NAMESPACE exec -it -c nextcloud-database $CONTAINER -- env PGPASSWORD="$PG_PASSWORD" psql -U nextcloud < dumpfile

Releases

No releases published

Packages

No packages published

Languages