diff --git a/README.md b/README.md index b446240..ad5f064 100644 --- a/README.md +++ b/README.md @@ -24,22 +24,3 @@ To run with Node: ```bash npm run start ``` - -## Infrastructure - -The infrastructure is on DigitalOcean. - -The website is hosted using the App Platform service from DigitalOcean. This is -free for static websites, and is quite flexible to add in extra apps as Droplets -or Functions at a later time if I so please. - -DigitalOcean App Platform re-deploys the website every time there's an update to -the `main` branch in this repo. - -All the DigitalOcean infrastructure is managed using Terraform. The code for -this is in the `infrastructure/` directory. - -The domain, however, is registered on AWS. The nameservers registered in AWS -have to be kept manually up-to-date with the DigitalOcean nameservers. These -shouldn't change, though, so this is unlikely to need intervention more than -once. diff --git a/infrastructure/.terraform.lock.hcl b/infrastructure/.terraform.lock.hcl deleted file mode 100644 index 3d0510b..0000000 --- a/infrastructure/.terraform.lock.hcl +++ /dev/null @@ -1,26 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/digitalocean/digitalocean" { - version = "2.38.0" - constraints = "~> 2.0" - hashes = [ - "h1:ElG5GAiHN6paMNUG0JnQ4uCv1Y37ZUbCXQSAQwb/j8U=", - "zh:04d1ca6ac6d7e69635657aeac8aadb75f84018305514381f9d7bed48065df61b", - "zh:081258f8526b3597eeb7154d5b453c2fe36194ca1a95e0de655d7a1080224be0", - "zh:15e77088b8a73012d87ad29ad3cf10392642a6781a35c0923a45386fe61cda61", - "zh:1a0c741f9be0f22c18fec93b4200c1968c1c6e4ac02292d494ace78b16f13fea", - "zh:2a3a778cd982e5e09a2414f0a16c54101c56d7ab6f824ea3e55709a608f7f3ea", - "zh:6832b594a7e408e085bf148c5a1e2eaf94ed8f47796b917acf56078ee9362ca1", - "zh:78b8acad99e7035344677f70c08c3daf457cfa3f8b467e73352d14353889b8cf", - "zh:8a1c446f1b3b5dee097fc000cf4d341b00602ace60246af4a09e5a49666a0638", - "zh:8c23094d06f5b4c780dbdde21c56b9b03b275c1cc8728669ef8f3f45e0d9fb24", - "zh:8c5a9871c2a2e094f58723624bb3fd2dbedafc8d9cab609df79d01011de79b8a", - "zh:a32adff1d0fc405f1596b6dc679b3029c87177e717eb991c418fff13ec559427", - "zh:a3f89176401db06ccc97b89a23bb004c8ab1562ce04178d6a08125bd4b8c073e", - "zh:d739de876cdd6176570c610e0edca0d2133b8e21787f22caa9a72d9806055c07", - "zh:d8a874a0e442c10deae3217bb88375209d45f79d52cb7d2b19756863d6ab6414", - "zh:eac47cd0b28953404622d11d8d4049ce2a4da3bc0a0ecaf386e5f55117386bbd", - "zh:ec3686163d1177d41f13588bb24db9a2b3afd199ac410d8c9899f053f271515c", - ] -} diff --git a/infrastructure/app.tf b/infrastructure/app.tf deleted file mode 100644 index 24ec010..0000000 --- a/infrastructure/app.tf +++ /dev/null @@ -1,53 +0,0 @@ -resource "digitalocean_app" "joeac_net" { - project_id = "c106269c-1115-4682-8757-867368e057a4" - - spec { - name = "joeac-net" - region = local.region - domain { - name = local.domain - } - features = [ - "buildpack-stack=ubuntu-22" - ] - - alert { - disabled = false - rule = "DEPLOYMENT_FAILED" - } - - alert { - disabled = false - rule = "DOMAIN_FAILED" - } - - ingress { - rule { - component { - name = "personal-website" - preserve_path_prefix = false - } - - match { - path { - prefix = "/" - } - } - } - } - - static_site { - build_command = "npm run build" - environment_slug = "node-js" - name = "personal-website" - output_dir = "website/dist" - source_dir = "/" - - github { - branch = "main" - deploy_on_push = true - repo = "joeacarstairs/personal-website" - } - } - } -} diff --git a/infrastructure/locals.tf b/infrastructure/locals.tf deleted file mode 100644 index d051e43..0000000 --- a/infrastructure/locals.tf +++ /dev/null @@ -1,5 +0,0 @@ -locals { - domain = "joeac.net" - region = "lon" -} - diff --git a/infrastructure/main.tf b/infrastructure/main.tf deleted file mode 100644 index a1aa568..0000000 --- a/infrastructure/main.tf +++ /dev/null @@ -1,9 +0,0 @@ -terraform { - required_providers { - digitalocean = { - source = "digitalocean/digitalocean" - version = "~> 2.0" - } - } -} - diff --git a/infrastructure/providers.tf b/infrastructure/providers.tf deleted file mode 100644 index 5b0e240..0000000 --- a/infrastructure/providers.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "digitalocean" { - token = var.do_token -} - diff --git a/infrastructure/variables.tf b/infrastructure/variables.tf deleted file mode 100644 index 9af60f9..0000000 --- a/infrastructure/variables.tf +++ /dev/null @@ -1,5 +0,0 @@ -variable "do_token" { - type = string - sensitive = true - description = "A DigitalOcean access token. Can also be provided as an environment variable" -}