Adding terraform destroy to makefile.
This commit is contained in:
5
Makefile
5
Makefile
@@ -2,7 +2,7 @@ TERRAFORM_ENV=production
|
|||||||
|
|
||||||
# .dirstamp plus && $@ is like make magic to get this rule
|
# .dirstamp plus && $@ is like make magic to get this rule
|
||||||
# to only run if the contents of all-apps changes
|
# 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/
|
rm -Rf app/
|
||||||
cp -a all-apps app && touch $@
|
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
|
apply: ignition.json $(TERRAFORM_ENV).tfvars generated.tfvars
|
||||||
bash -c "terraform apply -var-file=<(cat $(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
|
## to help me remember the command to run to test the config locally
|
||||||
testlocalhost:
|
testlocalhost:
|
||||||
curl -k --resolve localhost:443:146.190.12.129 https://localhost
|
curl -k --resolve localhost:443:146.190.12.129 https://localhost
|
||||||
|
|||||||
22
all-apps/nextcloud/nextcloud.env
Normal file
22
all-apps/nextcloud/nextcloud.env
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user