Skip to content

Commit

Permalink
Merge pull request #43 from bee-ci-system/yeet_karolak
Browse files Browse the repository at this point in the history
Yeet karolak
  • Loading branch information
bartekpacia authored Oct 19, 2024
2 parents 5a9045c + d0b9b5b commit 94a1ff4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 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
35 changes: 16 additions & 19 deletions infra-do/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,35 @@ resource "digitalocean_project" "project" {
digitalocean_app.app.urn,
digitalocean_database_cluster.postgres.urn,
digitalocean_database_cluster.redis.urn,
digitalocean_domain.old.urn,
digitalocean_domain.new.urn,
digitalocean_droplet.executor.urn,
digitalocean_droplet.influxdb.urn,
digitalocean_volume.influxdb_volume.urn,
# digitalocean_domain.main.urn,
]
}

// 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 @@ -202,7 +209,6 @@ resource "digitalocean_container_registry_docker_credentials" "default" {
}

/*
resource "digitalocean_domain" "main" {
name = "bee-ci.pacia.tech"
}
Expand All @@ -228,13 +234,4 @@ resource "digitalocean_record" "backend" {
# value = format("%s.", digitalocean_app.app.live_domain)
# value = format("%s.", digitalocean_app.app.live_domain)
}
*/

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

resource "digitalocean_domain" "new" {
name = "beeci-backend.karolak.cc"
}

0 comments on commit 94a1ff4

Please sign in to comment.