Skip to content

Commit

Permalink
migrate to pacia.tech domain from karolak.cc domain
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Oct 19, 2024
1 parent a2fe7b2 commit fd54a49
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 17 deletions.
2 changes: 1 addition & 1 deletion backend/e2e/http-client.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"prod": {
"server": {
"url": "https://beeci-backend.karolak.cc/backend"
"url": "https://bee-ci.pacia.tech/backend"
}
}
}
4 changes: 3 additions & 1 deletion backend/internal/server/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ type WebhookHandler struct {
buildRepo data.BuildRepo

// The domain where the auth cookie will be placed. For example
// ".pacia.tech" or ".karolak.cc". Must be empty for localhost.
// ".pacia.tech" or ".karolak.cc".
//
// Must be empty for localhost.
mainDomain string

// The URL the user will be redirected to after successful auth. For example
Expand Down
4 changes: 2 additions & 2 deletions infra-do/env.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ locals {
},
{
key = "MAIN_DOMAIN",
value = ".karolak.cc",
value = ".pacia.tech",
scope = "RUN_TIME",
},
{
key = "REDIRECT_URL",
value = "https://beeci.karolak.cc/dashboard",
value = "https://app.bee-ci.pacia.tech/dashboard",
scope = "RUN_TIME"
},
/*
Expand Down
36 changes: 23 additions & 13 deletions infra-do/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,29 @@ resource "digitalocean_project" "project" {
]
}

// General:
//
// CNAME bee-ci.pacia.tech bee-ci-tf-rqd3k.ondigitalocean.app
//
// For Vercel:
//
// CNAME app.bee-ci.pacia.tech cname.vercel-dns.com
// TXT _vercel.pacia.tech vc-domain-verify=app.bee-ci.pacia.tech,9f0455b9ebb2cffa2f86
//
// Ideally, we can get rid of Vercel, but it's blocked by:
// https://stackoverflow.com/questions/79029275/digital-ocean-app-platform-nextresponse-redirect-doesnt-work-status-code-2

resource "digitalocean_app" "app" {

spec {
name = "bee-ci-tf"
region = "sfo"

# domain {
# # name = "beeci-backend.ondigitalocean.app"
# type = "DEFAULT"
# }

// Requires the following record to be set on domain "pacia.tech"
// Type | Hostname | Value
// CNAME | bee-ci.pacia.tech | bee-ci-tf-rqd3k.ondigitalocean.app (or whatever DO generated)
domain {
name = "beeci-backend.karolak.cc"
name = "bee-ci.pacia.tech"
type = "PRIMARY"
}

Expand Down Expand Up @@ -231,10 +241,10 @@ resource "digitalocean_record" "backend" {
*/

resource "digitalocean_domain" "old" {
name = "bee-ci.karolak.cc"
}

resource "digitalocean_domain" "new" {
name = "beeci-backend.karolak.cc"
}
# resource "digitalocean_domain" "old" {
# name = "bee-ci.karolak.cc"
# }
#
# resource "digitalocean_domain" "new" {
# name = "beeci-backend.karolak.cc"
# }

0 comments on commit fd54a49

Please sign in to comment.