forked from cerc-io/snowballtools-base
Set subdomain for project and set URL for each deployment (#52)
* Display current deployment info in overview tab * Add assign domain dialog box in deployments * Add empty link for project settings in assign domain dialog box * Use react router dom link * Add sub domain to project entity * Add deployment url with custom generated string * Set nano id to deployment id * Add sub domain while creating new project * Use same id as in url * Update readme steps for production build * Update README --------- Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
+30
-10
@@ -3,110 +3,130 @@
|
||||
"projectIndex": 0,
|
||||
"domainIndex":0,
|
||||
"createdByIndex": 0,
|
||||
"id":"ffhae3zq",
|
||||
"title": "nextjs-boilerplate-1",
|
||||
"status": "Building",
|
||||
"environment": "Production",
|
||||
"isCurrent": true,
|
||||
"branch": "main",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-ffhae3zq.testProject.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 0,
|
||||
"domainIndex":1,
|
||||
"createdByIndex": 0,
|
||||
"id":"vehagei8",
|
||||
"title": "nextjs-boilerplate-2",
|
||||
"status": "Ready",
|
||||
"environment": "Preview",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-vehagei8.testProject.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 0,
|
||||
"domainIndex":2,
|
||||
"createdByIndex": 0,
|
||||
"id":"qmgekyte",
|
||||
"title": "nextjs-boilerplate-3",
|
||||
"status": "Error",
|
||||
"environment": "Development",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-qmgekyte.testProject.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 0,
|
||||
"domainIndex": null,
|
||||
"createdByIndex": 0,
|
||||
"id":"f8wsyim6",
|
||||
"title": "nextjs-boilerplate-4",
|
||||
"status": "Ready",
|
||||
"environment": "Production",
|
||||
"isCurrent": false,
|
||||
"branch": "prod",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-f8wsyim6.testProject.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 1,
|
||||
"domainIndex":3,
|
||||
"createdByIndex": 1,
|
||||
"id":"eO8cckxk",
|
||||
"title": "nextjs-boilerplate-1",
|
||||
"status": "Building",
|
||||
"environment": "Production",
|
||||
"isCurrent": true,
|
||||
"branch": "main",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-2-eO8cckxk.testProject-2.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 1,
|
||||
"domainIndex":4,
|
||||
"createdByIndex": 1,
|
||||
"id":"yaq0t5yw",
|
||||
"title": "nextjs-boilerplate-2",
|
||||
"status": "Ready",
|
||||
"environment": "Preview",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-2-yaq0t5yw.testProject-2.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 1,
|
||||
"domainIndex":5,
|
||||
"createdByIndex": 1,
|
||||
"id":"hwwr6sbx",
|
||||
"title": "nextjs-boilerplate-3",
|
||||
"status": "Error",
|
||||
"environment": "Development",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "testProject-2-hwwr6sbx.testProject-2.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 2,
|
||||
"domainIndex":6,
|
||||
"createdByIndex": 2,
|
||||
"id":"ndxje48a",
|
||||
"title": "nextjs-boilerplate-1",
|
||||
"status": "Building",
|
||||
"environment": "Production",
|
||||
"isCurrent": true,
|
||||
"branch": "main",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "iglootools-ndxje48a.iglootools.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 2,
|
||||
"domainIndex":7,
|
||||
"createdByIndex": 2,
|
||||
"id":"gtgpgvei",
|
||||
"title": "nextjs-boilerplate-2",
|
||||
"status": "Ready",
|
||||
"environment": "Preview",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "iglootools-gtgpgvei.iglootools.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"projectIndex": 2,
|
||||
"domainIndex":8,
|
||||
"createdByIndex": 2,
|
||||
"id":"b4bpthjr",
|
||||
"title": "nextjs-boilerplate-3",
|
||||
"status": "Error",
|
||||
"environment": "Development",
|
||||
"isCurrent": false,
|
||||
"branch": "test",
|
||||
"commitHash": "testXyz"
|
||||
"commitHash": "testXyz",
|
||||
"url": "iglootools-b4bpthjr.iglootools.snowball.xyz"
|
||||
}
|
||||
]
|
||||
|
||||
+10
-5
@@ -9,7 +9,8 @@
|
||||
"template": "test",
|
||||
"framework": "test",
|
||||
"webhooks": [],
|
||||
"icon": ""
|
||||
"icon": "",
|
||||
"subDomain": "testProject.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"ownerIndex": 1,
|
||||
@@ -21,7 +22,8 @@
|
||||
"template": "test-2",
|
||||
"framework": "test-2",
|
||||
"webhooks": [],
|
||||
"icon": ""
|
||||
"icon": "",
|
||||
"subDomain": "testProject-2.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"ownerIndex": 2,
|
||||
@@ -33,7 +35,8 @@
|
||||
"template": "test-3",
|
||||
"framework": "test-3",
|
||||
"webhooks": [],
|
||||
"icon": ""
|
||||
"icon": "",
|
||||
"subDomain": "iglootools.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"ownerIndex": 1,
|
||||
@@ -45,7 +48,8 @@
|
||||
"template": "test-4",
|
||||
"framework": "test-4",
|
||||
"webhooks": [],
|
||||
"icon": ""
|
||||
"icon": "",
|
||||
"subDomain": "iglootools-2.snowball.xyz"
|
||||
},
|
||||
{
|
||||
"ownerIndex": 0,
|
||||
@@ -57,6 +61,7 @@
|
||||
"template": "test-5",
|
||||
"framework": "test-5",
|
||||
"webhooks": [],
|
||||
"icon": ""
|
||||
"icon": "",
|
||||
"subDomain": "snowball-2.snowball.xyz"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -55,8 +55,6 @@ const loadAndSaveData = async <Entity extends ObjectLiteral>(entityType: EntityT
|
||||
};
|
||||
|
||||
const generateTestData = async (dataSource: DataSource) => {
|
||||
const domainRepository = await dataSource.getRepository(Domain);
|
||||
|
||||
const savedUsers = await loadAndSaveData(User, dataSource, path.resolve(__dirname, USER_DATA_PATH));
|
||||
const savedOrgs = await loadAndSaveData(Organization, dataSource, path.resolve(__dirname, ORGANIZATION_DATA_PATH));
|
||||
|
||||
@@ -67,6 +65,8 @@ const generateTestData = async (dataSource: DataSource) => {
|
||||
|
||||
const savedProjects = await loadAndSaveData(Project, dataSource, path.resolve(__dirname, PROJECT_DATA_PATH), projectRelations);
|
||||
|
||||
const domainRepository = dataSource.getRepository(Domain);
|
||||
|
||||
const domainPrimaryRelations = {
|
||||
project: savedProjects
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user