• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Loading multiple instances when MM2 is in Docker container

Scheduled Pinned Locked Moved Solved Troubleshooting
6 Posts 2 Posters 159 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    WiredRacing
    last edited by Sep 20, 2024, 3:54 PM

    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?

    S 2 Replies Last reply Sep 20, 2024, 7:00 PM Reply Quote 0
    • S Away
      sdetweil @WiredRacing
      last edited by sdetweil Sep 20, 2024, 7:18 PM Sep 20, 2024, 7:00 PM

      @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 start

      also, 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

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Sep 20, 2024, 10:26 PM Reply Quote 0
      • S Away
        sdetweil @sdetweil
        last edited by Sep 20, 2024, 10:26 PM

        and i’ll add, the right way using docker is to spin up another container

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        W 1 Reply Last reply Sep 24, 2024, 7:38 PM Reply Quote 0
        • S Away
          sdetweil @WiredRacing
          last edited by Sep 23, 2024, 8:51 PM

          @WiredRacing did you get this working?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • W Offline
            WiredRacing @sdetweil
            last edited by Sep 24, 2024, 7:38 PM

            @sdetweil Ahh, thanks for the education on the &. Working now!

            Note: I wrote this a couple days ago, just didn’t click ‘submit’. :)

            S 1 Reply Last reply Sep 24, 2024, 7:54 PM Reply Quote 0
            • W WiredRacing has marked this topic as solved on Sep 24, 2024, 7:39 PM
            • S Away
              sdetweil @WiredRacing
              last edited by Sep 24, 2024, 7:54 PM

              @WiredRacing awesome

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                1/6
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy