Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export const metadata: Metadata = {
alternates: {
canonical: '/',
},
icons: {
icon: [{ url: '/favicon.svg', type: 'image/svg+xml' }],
shortcut: '/favicon.svg',
},
manifest: '/site.webmanifest',
}

export const viewport: Viewport = {
Expand Down
4 changes: 4 additions & 0 deletions infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ In the DigitalOcean console, authorize App Platform to access `nmandiveyi/portfo
```bash
cd infra/environments/prod
export TF_VAR_do_token="dop_v1_..."
# or set do_token and do_project_id in portfolio.auto.tfvars (see below)
terraform init
terraform apply
```
Expand Down Expand Up @@ -112,6 +113,9 @@ Never commit secrets. Edit `portfolio.auto.tfvars` (gitignored, auto-loaded):

```bash
# infra/environments/prod/portfolio.auto.tfvars
do_token = "dop_v1_..."
do_project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # doctl projects list

cloudflare_enabled = false
cloudflare_dns_enabled = false
cloudflare_proxy_enabled = false
Expand Down
1 change: 1 addition & 0 deletions infra/environments/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module "frontend" {
site_url = local.frontend_site_url

manage_dns_zone = !var.cloudflare_dns_enabled
project_id = var.do_project_id
}

module "cloudflare" {
Expand Down
3 changes: 2 additions & 1 deletion infra/environments/prod/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# do_token — set in portfolio.auto.tfvars (gitignored) or export TF_VAR_do_token:
# do_token / do_project_id — set in portfolio.auto.tfvars (gitignored) or export TF_VAR_*:
# export TF_VAR_do_token="dop_v1_..."
# export TF_VAR_do_project_id="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#
# cloudflare_api_token / cloudflare_account_id — same pattern; see portfolio.auto.tfvars.
#
Expand Down
5 changes: 5 additions & 0 deletions infra/environments/prod/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ variable "do_token" {
sensitive = true
}

variable "do_project_id" {
description = "DigitalOcean project UUID for the App Platform app. List with: doctl projects list"
type = string
}

variable "environment" {
description = "Environment"
type = string
Expand Down
2 changes: 2 additions & 0 deletions infra/modules/frontend/main.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
resource "digitalocean_app" "this" {
project_id = var.project_id

spec {
name = var.name
region = var.region
Expand Down
5 changes: 5 additions & 0 deletions infra/modules/frontend/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ variable "manage_dns_zone" {
type = bool
default = true
}

variable "project_id" {
description = "DigitalOcean project UUID. Without this, the app is created in your account default project."
type = string
}
12 changes: 11 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {}
const nextConfig: NextConfig = {
async redirects() {
return [
{
source: '/favicon.ico',
destination: '/favicon.svg',
permanent: false,
},
]
},
}

export default nextConfig
Loading