Skip to content

Commit

Permalink
Merge pull request #6258 from signalco-io/feat/uier/cloud
Browse files Browse the repository at this point in the history
Feat/uier/cloud
  • Loading branch information
AleksandarDev authored Nov 16, 2024
2 parents a6def34 + 750a0db commit 63c8da5
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 7 deletions.
8 changes: 6 additions & 2 deletions infra/apps/cloud-primary/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion infra/apps/uier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
27 changes: 26 additions & 1 deletion infra/apps/uier/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Check warning on line 7 in infra/apps/uier/src/index.ts

View workflow job for this annotation

GitHub Actions / uier infrastructure (deploy) / infra-build-and-execute

'createStorageAccount' is defined but never used
import { Profile, Endpoint, SkuName } from '@pulumi/azure-native/cdn/index.js';

Check warning on line 8 in infra/apps/uier/src/index.ts

View workflow job for this annotation

GitHub Actions / uier infrastructure (deploy) / infra-build-and-execute

'Profile' is defined but never used

Check warning on line 8 in infra/apps/uier/src/index.ts

View workflow job for this annotation

GitHub Actions / uier infrastructure (deploy) / infra-build-and-execute

'Endpoint' is defined but never used

Check warning on line 8 in infra/apps/uier/src/index.ts

View workflow job for this annotation

GitHub Actions / uier infrastructure (deploy) / infra-build-and-execute

'SkuName' is defined but never used

const up = async () => {
const stack = getStack();

const shouldProtect = stack === 'production';

Check warning on line 12 in infra/apps/uier/src/index.ts

View workflow job for this annotation

GitHub Actions / uier infrastructure (deploy) / infra-build-and-execute

'shouldProtect' is assigned a value but never used
const app = nextJsApp('uier', 'uier', 'web/apps/uier');

// Configure domain name
Expand All @@ -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';
Expand Down
37 changes: 37 additions & 0 deletions infra/infra.code-workspace
Original file line number Diff line number Diff line change
@@ -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": {}
}
3 changes: 0 additions & 3 deletions infra/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 63c8da5

Please sign in to comment.