Skip to content

Commit 9597838

Browse files
committed
* MS the ports that tilt uses for its frontend are consistent with the project-standard port-numbering scheme. (see readme->#project-service-urls)
1 parent 2fdb08d commit 9597838

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Remote (public):
156156
Port-assignment scheme: (ie. meaning of each digit in `ABCD`)
157157
* A) app/project [5: debate-map]
158158
* B) cluster [0: skipped, 1: local, 2: remote] (0 is skipped to avoid clashes with common ports, eg. 5000 for UPnP)
159-
* C) pod [0: web-server, 1: app-server, 2: postgres instance, 3: monitor, 4: hyperknowledge]
159+
* C) pod [0: web-server, 1: app-server, 2: postgres instance, 3: monitor, 4: hyperknowledge, 5: tilt]
160160
* D) variant [0: main, 1: served from webpack, etc.]
161161

162162
> Note: Not all web-accessible k8s services are shown in the list above. Specifically:

package-scripts.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Object.assign(scripts, {
1717

1818
Object.assign(scripts, {
1919
app_server: {
20-
run: Dynamic(()=> {
20+
run: Dynamic(()=>{
2121
const port = 5120;
2222
const secret = GetK8sPGUserAdminSecretData("dm-local");
2323
const envVarsCommand = SetEnvVarsCmd({
@@ -27,7 +27,7 @@ Object.assign(scripts, {
2727
DB_ADDR: "localhost",
2828
DB_NAME: "debate-map",
2929

30-
ENVIRONMENT: 'dev'
30+
ENVIRONMENT: "dev"
3131
});
3232
return `${envVarsCommand} cd Packages/app-server && cargo run`;
3333
}),
@@ -216,7 +216,7 @@ Object.assign(scripts, {
216216
const latestKGetFolder = folders.slice(-1)[0];
217217
const profFile = paths.resolve(latestKGetFolder, "")
218218
});*/
219-
// eslint-disable-next-line global-require
219+
220220
require("globby")("./Temp/kget_as-rs_*/*profdata", {stats: true}).then(/** @param {import("globby").Entry[]} files */ files=>{
221221
files.sort((a, b)=>a.stats.ctimeMs - b.stats.ctimeMs);
222222
const latestProfDataFile = paths.resolve(files.slice(-1)[0].path);
@@ -297,7 +297,7 @@ function GetPortForwardCommandsStr(context) {
297297

298298
const extraTiltArgs = commandArgs.join(" ");
299299
function RunTiltUp_ForSpecificPod(podName, port, tiltfileArgsStr) {
300-
let command = `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt up ${podName} --stream -f ./Tilt/Main.star --context dm-ovh --port ${port} -- --env prod`;
300+
let command = `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt up ${podName} --stream -f ./Tilt/Main.star --context dm-ovh --port ${port} -- --env prod`;
301301
if (tiltfileArgsStr) command += ` -- --env prod ${tiltfileArgsStr} ${extraTiltArgs}`;
302302
//const command_parts = command.split(" ");
303303
const commandProcess = process.platform === "win32"
@@ -341,11 +341,11 @@ Object.assign(scripts, {
341341
return KubeCTLCommand(commandArgs[0], `-n postgres-operator port-forward $(${GetPodNameCmd_DB(commandArgs[0])}) 8081:5432`);
342342
}),*/
343343

344-
tiltUp_local: `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-local -- --env dev ${extraTiltArgs}`,
345-
tiltUp_local_release: `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-local -- --env dev --compileWithRelease ${extraTiltArgs}`,
346-
tiltDown_local: `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt down -f ./Tilt/Main.star --context dm-local -- --env dev ${extraTiltArgs}`,
347-
tiltUp_ovh: `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-ovh --port 10351 -- --env prod ${extraTiltArgs}`, // tilt-port +1, so can coexist with tilt dev-instance
348-
tiltDown_ovh: `${PrepDockerCmd()} ${SetTileEnvCmd()} tilt down -f ./Tilt/Main.star --context dm-ovh --port 10351 -- --env prod ${extraTiltArgs}`,
344+
tiltUp_local: `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-local --port 5150 -- --env dev ${extraTiltArgs}`,
345+
tiltUp_local_release: `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-local --port 5150 -- --env dev --compileWithRelease ${extraTiltArgs}`,
346+
tiltDown_local: `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt down -f ./Tilt/Main.star --context dm-local --port 5150 -- --env dev ${extraTiltArgs}`,
347+
tiltUp_ovh: `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt up -f ./Tilt/Main.star --context dm-ovh --port 5250 -- --env prod ${extraTiltArgs}`,
348+
tiltDown_ovh: `${PrepDockerCmd()} ${SetTiltEnvCmd()} tilt down -f ./Tilt/Main.star --context dm-ovh --port 5250 -- --env prod ${extraTiltArgs}`,
349349
// these are pod-specific tilt-up commands, for when you want to only update a single pod (well technically, that one pod plus all its dependencies, currently -- but still useful to avoid updating other 1st-party pods)
350350
tiltUp_ovh_webServer: Dynamic(()=>RunTiltUp_ForSpecificPod("dm-web-server", 10361)), // tilt-port +(10+1), as targeted tilt-up #1
351351
tiltUp_ovh_appServer: Dynamic(()=>RunTiltUp_ForSpecificPod("dm-app-server", 10362)), // tilt-port +(10+2), as targeted tilt-up #2
@@ -492,7 +492,7 @@ Object.assign(scripts, {
492492
},
493493
});
494494
scripts.backend.dockerBuild_gitlab_base = `${PrepDockerCmd()} docker build -f ./Packages/deploy/@JSBase/Dockerfile -t registry.gitlab.com/venryx/debate-map .`;
495-
function SetTileEnvCmd() {
495+
function SetTiltEnvCmd() {
496496
return SetEnvVarsCmd({
497497
TILT_WATCH_WINDOWS_BUFFER_SIZE: "65536999",
498498
//ENVIRONMENT: prod ? "prod" : "dev", // commented; now passed as tilt config (eg. " --env=prod")

0 commit comments

Comments
 (0)