aboutsummaryrefslogtreecommitdiff
path: root/infrastructure/app.tf
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+joeacarstairs@users.noreply.github.com>2024-05-10 21:57:35 +0100
committerGitHub <noreply@github.com>2024-05-10 21:57:35 +0100
commit88c6e8a6585c00f0a94e27f1351e77ef18518196 (patch)
tree18c7485fddabdedd7c2b7b57844c22cf9c1b5954 /infrastructure/app.tf
parentefb931b1b8e3d0d0be3665304a34b2b2b1b5a90e (diff)
Moves to DigitalOcean from AWS (#4)
* Moves to DigitalOcean from AWS * README * Removes deployment workflow --------- Co-authored-by: Joe Carstairs <65492573+Sycamost@users.noreply.github.com>
Diffstat (limited to 'infrastructure/app.tf')
-rw-r--r--infrastructure/app.tf53
1 files changed, 53 insertions, 0 deletions
diff --git a/infrastructure/app.tf b/infrastructure/app.tf
new file mode 100644
index 0000000..24ec010
--- /dev/null
+++ b/infrastructure/app.tf
@@ -0,0 +1,53 @@
+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"
+ }
+ }
+ }
+}