Skip to content

Commit

Permalink
OK-652 fiksattu domain
Browse files Browse the repository at this point in the history
  • Loading branch information
marjakari committed Nov 14, 2024
1 parent b140e2d commit 9f6ce12
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cdk/lib/sovellus-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {NagSuppressions} from "cdk-nag";
import path = require("path");
import {Nextjs} from "cdk-nextjs-standalone";
import {PriceClass} from "aws-cdk-lib/aws-cloudfront";
import * as domain from "node:domain";

interface ViestinValitysStackProps extends cdk.StackProps {
environmentName: string;
Expand Down Expand Up @@ -412,27 +413,27 @@ export class SovellusStack extends cdk.Stack {
}
);

const domainName = `viestinvalitys.${publicHostedZones[props.environmentName]}`;
const certificate = new acm.DnsValidatedCertificate(
this,
"SiteCertificate",
{
domainName: `viestinvalitys.${publicHostedZones[props.environmentName]}`,
domainName: domainName,
hostedZone: zone,
region: "us-east-1", // Cloudfront only checks this region for certificates.
}
);
/**
* Uusi raportointikäyttöliittymä
*/
const domainName = `https://viestinvalitys.${publicHostedZones[props.environmentName]};`
const nextjs = new Nextjs(this, 'Viestinvalitys-nextjs', {
const nextjs = new Nextjs(this, 'ViestinvalitysRaportointi', {
nextjsPath: '../viestinvalitys-raportointi', // relative path from your project root to NextJS
buildCommand: 'pwd && npx --yes open-next@^2 build -- --build-command "npm run noop"',
basePath: '/raportointi',
environment: {
VIRKAILIJA_URL: `https://virkailija.${publicHostedZones[props.environmentName]}`,
VIESTINTAPALVELU_URL: domainName,
LOGIN_URL: `https://viestinvalitys.${publicHostedZones[props.environmentName]}/raportointi/login`,
LOGIN_URL: `https://${domainName}/raportointi/login`,
PORT: '8080',
},
domainProps: {
Expand Down

0 comments on commit 9f6ce12

Please sign in to comment.