diff --git a/infra/apps/cloud-primary/src/index.ts b/infra/apps/cloud-primary/src/index.ts index 5957bb3339..a5a4bc13fc 100644 --- a/infra/apps/cloud-primary/src/index.ts +++ b/infra/apps/cloud-primary/src/index.ts @@ -52,7 +52,6 @@ const up = async () => { return {}; } else { const shouldProtect = stack === 'production'; - const domainName = `${config.require('domain')}`; const resourceGroupName = `signalco-cloud-${stack}`; const signalrPrefix = 'sr'; @@ -62,6 +61,8 @@ const up = async () => { const currentStack = new StackReference(`signalco/${getProject()}/${getStack()}`); const resourceGroup = new ResourceGroup(resourceGroupName); + + const domainName = `${config.require('domain')}`; const corsDomains = [`app.${domainName}`, `www.${domainName}`, domainName]; const signalr = createSignalR(resourceGroup, signalrPrefix, corsDomains, stack === 'production' ? 'standard1' : 'free', false); @@ -91,7 +92,10 @@ const up = async () => { currentStack, false, sharedLinuxConsumptionPlan.plan.id); - const apiFuncPublish = await publishProjectAsync(['../../../cloud/src/Signalco.Api.Public', api.name].filter(i => i.length).join('.')); + const apiFuncPublish = await publishProjectAsync([ + '../../../cloud/src/Signalco.Api.Public', + api.name, + ].filter(i => i.length).join('.')); const apiFuncCode = await assignFunctionCodeAsync( resourceGroup, funcStorage.storageAccount.storageAccount, diff --git a/infra/apps/uier/package.json b/infra/apps/uier/package.json index 351f005501..a098e5493d 100644 --- a/infra/apps/uier/package.json +++ b/infra/apps/uier/package.json @@ -27,7 +27,6 @@ "@pulumi/azure-native": "2.72.0", "@pulumi/cloudflare": "5.43.0", "@pulumi/command": "1.0.1", - "@pulumi/docker": "4.5.7", "@pulumi/pulumi": "3.139.0", "@pulumiverse/vercel": "1.14.3" } diff --git a/infra/apps/uier/src/index.ts b/infra/apps/uier/src/index.ts index b112b322ef..4abb9c13e7 100644 --- a/infra/apps/uier/src/index.ts +++ b/infra/apps/uier/src/index.ts @@ -4,10 +4,12 @@ import { ProjectDomain, ProjectEnvironmentVariable } from '@pulumiverse/vercel'; import { getStack } from '@pulumi/pulumi'; import { ResourceGroup } from '@pulumi/azure-native/resources/index.js'; import { DatabaseAccount, SqlResourceSqlDatabase, SqlResourceSqlContainer, DatabaseAccountOfferType, listDatabaseAccountConnectionStringsOutput } from '@pulumi/azure-native/documentdb/index.js'; +import { createStorageAccount } from '@infra/pulumi/azure'; +import { Profile, Endpoint, SkuName } from '@pulumi/azure-native/cdn/index.js'; const up = async () => { const stack = getStack(); - + const shouldProtect = stack === 'production'; const app = nextJsApp('uier', 'uier', 'web/apps/uier'); // Configure domain name @@ -31,6 +33,29 @@ const up = async () => { const resourceGroupName = `uier-${stack}`; const resourceGroup = new ResourceGroup(resourceGroupName); + // TODO: Create Static files storage + // const staticFilesStorage = createStorageAccount( + // resourceGroup, + // 'static', + // shouldProtect, + // ); + + // TODO: Create CDN for status files storage + // const cdnProfile = new Profile('uier-staticcndprofile', { + // resourceGroupName: resourceGroup.name, + // sku: { + // name: SkuName.Standard_Microsoft, + // }, + // profileName: 'uier-staticFiles-cdn', + // }); + // new Endpoint('uier-staticFiles', { + // resourceGroupName: resourceGroup.name, + // profileName: cdnProfile.name, + // origins: [ + + // ], + // }); + // Create an Azure Cosmos DB Account for SQL API const cosmosAccountName = 'uierdb'; const databaseName = 'uierdata'; diff --git a/infra/infra.code-workspace b/infra/infra.code-workspace new file mode 100644 index 0000000000..51ea9ed654 --- /dev/null +++ b/infra/infra.code-workspace @@ -0,0 +1,37 @@ +{ + "folders": [ + { + "name": "✨ infra-monorepo", + "path": "." + }, + { + "name": "🚀 cloud-primary", + "path": "apps/cloud-primary" + }, + { + "name": "🚀 uier.io", + "path": "apps/uier" + }, + { + "name": "🚀 remote-browser", + "path": "apps/remote-browser" + }, + { + "name": "📦 @signalco/lexorder", + "path": "packages/lexorder" + }, + { + "name": "⚙️ @infra/eslint-config", + "path": "packages/eslint-config" + }, + { + "name": "⚙️ @infra/pulumi", + "path": "packages/pulumi" + }, + { + "name": "⚙️ @infra/typescript-config", + "path": "packages/typescript-config" + } + ], + "settings": {} +} \ No newline at end of file diff --git a/infra/pnpm-lock.yaml b/infra/pnpm-lock.yaml index 687fa72d8f..771436c159 100644 --- a/infra/pnpm-lock.yaml +++ b/infra/pnpm-lock.yaml @@ -191,9 +191,6 @@ importers: '@pulumi/command': specifier: 1.0.1 version: 1.0.1(ts-node@7.0.1)(typescript@5.6.3) - '@pulumi/docker': - specifier: 4.5.7 - version: 4.5.7(ts-node@7.0.1)(typescript@5.6.3) '@pulumi/pulumi': specifier: 3.139.0 version: 3.139.0(ts-node@7.0.1)(typescript@5.6.3)