Read the statement by Michael Teeuw here.
Loading multiple instances when MM2 is in Docker container
-
So the docker setup I have runs a start_server.sh script and once it his ‘npm run server’ it just shows logging info, meaning it won’t execute anything I put under it (until I kill the running task, I’d assume).
I believe the typical method to handle this is by using PM2, but I don’t have that here.
So right now I just open the console to the container, change the MM_CONFIG_FILE path to my 2nd config file and execute ‘npm run server’ and close that console window.
What’s the best/proper method for me to get them both to launch automatically?
-
@WiredRacing in linux the detach is a & as the last character of a command
export MM_CONFIG_FILE=…
npm start server &
export MM_CONFIG_FILE=…
npm start &one as server only one as full, just for example
in windows its
set MM_CONFIG_FILE=
detach npm run server
set MM_CONFIG_FILE=
npm startalso, not related to docker. docker container is a linux instance
if using pm2, you do NOT want to detach the last one, as the script will end, and pm2 will try to restart it
maybe same in the docker startup
-
and i’ll add, the right way using docker is to spin up another container
-
@WiredRacing did you get this working?
-
@sdetweil Ahh, thanks for the education on the &. Working now!
Note: I wrote this a couple days ago, just didn’t click ‘submit’. :)
-
-
@WiredRacing awesome