Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/debate-map/app
Browse files Browse the repository at this point in the history
  • Loading branch information
Venryx committed May 13, 2024
2 parents d533dd3 + a67b55c commit 4b8360c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ export class CG_Claim extends CG_Node {

// v3 (tool extending claim-gen)
arguments?: (string | CG_Argument)[];

// v4
counter_claim?: string;
}
export class CG_Argument extends CG_Node {
argument: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const GetResourcesInClaim_CG = CreateAccessor((context: ImportContext, cl
const args = [] as CG_Argument[];
if (claim.argument) args.push({argument: claim.argument} as CG_Argument);
if (claim.arguments) args.push(...claim.arguments.map(a=>(IsString(a) ? {argument: a} : a)) as CG_Argument[]);
if (claim.counter_claim) args.push({argument: claim.counter_claim} as CG_Argument);
for (const [i, argument] of args.entries()) {
result.push(NewNodeResource(context, argument, NodeType.claim, path_indexes.concat(i), path_titles.concat(argument.argument), claimResource, ChildGroup.freeform));
}
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,12 @@ Approach 2: (by using external psql with port-forwarding; requires that PostgreS
* 2\) Run: `npm start "db.psql_k8s [dm-local/dm-ovh]"`
* 3\) The shell should now have you logged in as the `admin` user.

Approach 3: (by using dbeaver)
* 1\) Set up a port-forward from `localhost:[5120/5220]` to your k8s database pod. (see: [port-forwarding](#port-forwarding))
* 2\) Retrieve the data from "debate-map-pguser-admin" for the "dm-local" context by running `npm start db.local_secrets`
* 3\) Enter the data printed in the console to make a new dbeaver connection.


</details>

<!----><a name="k8s-view-pg-config"></a>
Expand Down
9 changes: 9 additions & 0 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,15 @@ Object.assign(scripts, {
console.log("Connecting psql to database:", database);
const psqlProcess = StartPSQLInK8s(K8sContext_Arg(), database, {stdio: "inherit"}, pager);
}),
local_secrets: Dynamic(()=>{
// we only care about local context data here, so no need to pass context to GetK8sPGUserAdminSecretData
const secret = GetK8sPGUserAdminSecretData("dm-local");
console.log("--- Local Secrets ---");
console.log("PORT:", 5120);
console.log("DATABASE:", "debate-map");
console.log("USER:", "admin");
console.log("PASSWORD:", secret.GetField("password").toString());
}),

// db init/seed commands (using psql to run standard .sql files)
buildSeedDBScript: GetBuildSeedDBScriptCommand(),
Expand Down

0 comments on commit 4b8360c

Please sign in to comment.