Replies: 1 comment
-
Also need to make sure to change line 20 of /packer/supabase/docker-compose.yml from "- DNSPLUGIN=digitalocean" to "- DNSPLUGIN=cloudflare" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It took me a day and a ton of help from @timothymamo to figure this out, so sharing with everyone else:)
PART 1: Changing the subdomain
You need to modify the subdomain in 5 places, namely
PART 2: Using CloudFlare as DNS provider
First of all, there's a small thing that I still haven't managed to fix. Even though we'll rely 100% on CloudFlare, the build process still asks DO API about the website. You need to register your "domain.com" in Networking -> Domains section and leave it there as it is, without any further actions. This is just to suppress the error.
Create a new file in the terraform/files directory called cloudflare.ini.tftpl with the following:
In the locals.tf file remove line 136 and add the following:
and change line 169 and 173 (164 and 168 before modification) in the locals.tf file to have the following:
In your docker-compose.yml file change line 24 to the following:
- ./cloudflare.ini:/config/dns-conf/cloudflare.ini
Now go to terraform/providers.tf file and, in required_providers, add
then, below, where providers are actually assigned with API keys, add this record:
Now search for all occurrences of digitalocean_record (1 in network.tf and 5 in sendgrid.tf) and replace it with cloudflare_record, and also swap the domain parameter with "zone_id = var.cloudflare_zone_id" (this is a term used in CF).
Finally, go to variables.tf and add 3 new vars:
Zone ID is available in Dashboard, account API KEY is available in My Profile -> API TOKENS.
Now you're good to go, fill the variables in terraform.tfvars and deploy:)
Beta Was this translation helpful? Give feedback.
All reactions