run.sh not working as expected
-
Hi,
I'm not familiar with Docker packaging and custom apps, so I'm running my small Node.js applications within the LAMP app.
To use the latest Node.js version (since the default in the LAMP app is v18.18.0), I reinstalled Node.js in a custom path.I then added the following commands to the run.sh file to use my custom Node.js installation:
export PATH="/app/data/nodejs/bin:$PATH" export NODE_PATH="/app/data/node_modules" export npm_config_prefix="/app/data" export npm_config_cache="/app/data/.npm-cache"
However, these commands don't seem to execute automatically. Each time I open the terminal (not just when I restart the app), I have to manually enter these commands to use the custom Node.js path. It appears that the run.sh file isn't running these commands as expected, or perhaps I'm missing something.
Could someone please advise on what I might be doing wrong or suggest a solution?
Any help would be appreciated!
Thanks! -
@Eliahou that is expected .
run.sh
is only run as part of the container's start up. It's not part of "shell" start up sequence. An idea is to put those lines in/app/data/.bashrc
which gets imported as part of the shell start up . You can use File manager and put that file in .bashrc or the web terminal -
-