Skip to content

Commit

Permalink
fix local command in custom runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
rsonghuster committed Mar 22, 2024
1 parent 3084a69 commit f41a287
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/subCommands/local/impl/invoke/customLocalInvoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CustomLocalInvoke extends BaseLocalInvoke {
const mntStr = await this.getMountString();
const image = await this.getRuntimeRunImage();
const envStr = await this.getEnvString();
const dockerCmdStr = `docker run --name ${this.getContainerName()} --platform linux/amd64 --rm -p ${port}:${this.getCaPort()} --memory=${this.getMemorySize()}m ${mntStr} ${envStr} ${image}`;
const dockerCmdStr = `docker run --name ${this.getContainerName()} --platform linux/amd64 --rm -p ${port}:${this.getCaPort()} --memory=${this.getMemorySize()}m ${mntStr} ${envStr} ${image} --event '${this.getEventString()}'`;
if (!_.isEmpty(this.getDebugArgs())) {
if (this.debugIDEIsVsCode()) {
await this.writeVscodeDebugConfig();
Expand Down Expand Up @@ -58,6 +58,8 @@ export class CustomLocalInvoke extends BaseLocalInvoke {
envStr += ` -e "AGENT_SCRIPT=${agent_script}"`;
}
}
// FC_SERVER_PORT
envStr += ` -e "FC_SERVER_PORT=${this.getCaPort()}"`;
return envStr;
}
}
2 changes: 2 additions & 0 deletions src/subCommands/local/impl/start/customLocalStart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export class CustomLocalStart extends BaseLocalStart {
envStr += ` -e "AGENT_SCRIPT=${agent_script}"`;
}
}
// FC_SERVER_PORT
envStr += ` -e "FC_SERVER_PORT=${this.getCaPort()}"`;
return envStr;
}
}

0 comments on commit f41a287

Please sign in to comment.