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 171 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

      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 Reply Quote 0
      • S Away
        sdetweil @WiredRacing
        last edited by sdetweil

        @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 Reply Quote 0
        • S Away
          sdetweil @sdetweil
          last edited by

          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 Reply Quote 0
          • S Away
            sdetweil @WiredRacing
            last edited by

            @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

              @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 Reply Quote 0
              • W WiredRacing has marked this topic as solved on
              • S Away
                sdetweil @WiredRacing
                last edited by

                @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
                • First post
                  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