sdedic commented on code in PR #7698:
URL: https://github.com/apache/netbeans/pull/7698#discussion_r1740456913
##########
java/java.lsp.server/vscode/src/extension.ts:
##########
@@ -972,8 +972,25 @@ function openSSHSession(username: string, host: string,
name?: string) {
terminal.show();
}
-function runDockerSSH(username: string, host: string, dockerImage: string) {
- const sshCommand = `ssh ${username}@${host} "docker pull ${dockerImage} &&
docker run -p 8080:8080 -it ${dockerImage}"`;
+async function runDockerSSH(username: string, host: string, dockerImage:
string) {
+ const configFilePath: string = await
vscode.commands.executeCommand('nbls.config.file.path') as string;
+ const paths: string[] = configFilePath.split(",");
+
+ const applicationPropertiesRemotePath =
`/home/${username}/application.properties`;
+ const bootstrapPropertiesRemotePath =
`/home/${username}/bootstrap.properties`;
+ const applicationPropertiesContainerPath =
"/home/app/application.properties";
+ const bootstrapPropertiesContainerPath = "/home/app/bootstrap.properties";
+
+ let sshCommand = `scp "${paths[0]}"
${username}@${host}:${bootstrapPropertiesRemotePath} `;
+ let mountVolume = `-v
${bootstrapPropertiesRemotePath}:${bootstrapPropertiesContainerPath}:Z`;
+ let micronautConfigFilesEnv = `${bootstrapPropertiesContainerPath}`;
+
+ if (paths.length > 1) {
Review Comment:
Note that if bootstrap props is empty, the server part [does not
include](https://github.com/apache/netbeans/pull/7698/files#diff-454320ed6ea71f3969632101b3de1a06c5cd2cb05eb16b169570f30754cc8597R66)
that entry in the path list at 1st position.
Suggest to either return a pair/list of paths, possibly empty where each of
the slots is reserved for a certain properties flavour, or a Map that would map
from {bootstrap|application}.properties filename to the absolute path of the
generated temp file.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists