From ba997b3a9d0513c368431606c69eaeb86cf9ed5b Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Sun, 31 Aug 2025 09:01:01 -0700 Subject: [PATCH] Adding terraform destroy to makefile. --- Makefile | 5 ++++- all-apps/nextcloud/nextcloud.env | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 all-apps/nextcloud/nextcloud.env diff --git a/Makefile b/Makefile index 2df9ee3..82fe702 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ TERRAFORM_ENV=production # .dirstamp plus && $@ is like make magic to get this rule # to only run if the contents of all-apps changes -app/.dirstamp: all-apps/app.service all-apps/docker-compose.yaml $(wildcard all-apps/lb/*) $(wildcard all-apps/Nextcloud/*) $(wildcard all-apps/wg-easy/*) +app/.dirstamp: all-apps/app.service all-apps/docker-compose.yaml $(wildcard all-apps/lb/*) $(wildcard all-apps/nextcloud/*) $(wildcard all-apps/wg-easy/*) rm -Rf app/ cp -a all-apps app && touch $@ @@ -21,6 +21,9 @@ plan: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars apply: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars bash -c "terraform apply -var-file=<(cat $(TERRAFORM_ENV).tfvars generated.tfvars)" +destroy: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars + bash -c "terraform destroy -var-file=<(cat $(TERRAFORM_ENV).tfvars generated.tfvars)" + ## to help me remember the command to run to test the config locally testlocalhost: curl -k --resolve localhost:443:146.190.12.129 https://localhost diff --git a/all-apps/nextcloud/nextcloud.env b/all-apps/nextcloud/nextcloud.env new file mode 100644 index 0000000..a8b5d84 --- /dev/null +++ b/all-apps/nextcloud/nextcloud.env @@ -0,0 +1,22 @@ +# TODO generate +DOMAIN="nextcloud.nassella.cc" + +NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} + +# reverse proxy config +OVERWRITEHOST=${DOMAIN} +OVERWRITECLIURL=https://${DOMAIN} +OVERWRITEPROTOCOL=https +TRUSTED_PROXIES=172.16.0.0/24 # trust the local lb +PHP_MEMORY_LIMIT=1G +PHP_UPLOAD_LIMIT=10G +POSTGRES_HOST=db +POSTGRES_DB_FILE=/run/secrets/postgres_db +POSTGRES_USER_FILE=/run/secrets/postgres_user +POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password +# admin user +NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password +NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user +# redis +REDIS_HOST=redis +REDIS_HOST_PASSWORD_FILE=/run/secrets/redis_password \ No newline at end of file