Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Magic Mirror Server and Client mode documentation #186

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

briodan
Copy link

@briodan briodan commented Sep 18, 2023

updating instructions on how to run MagicMirror in server only and client only mode.

fixes #3196

@sdetweil
Copy link
Collaborator

sdetweil commented Sep 18, 2023

really there's just one install,
it copies the files and does NPM install

and then you can run any one of the three environments from there
full
or
server only
or
client only

just by changing the command

My script is targeted at running full but again all you have to do is change the command to launch the other environments

@briodan
Copy link
Author

briodan commented Sep 23, 2023

maybe i went a bit heavy on the documentation, my approach was with the mindset of what would have helped me figure it out without having to look at any other sources or do any googling.

Feel free to edit/amend as needed.

@bugsounet
Copy link
Contributor

Can you change the target to the develop branch ?
It's better

Thanks :)

@briodan briodan changed the base branch from master to develop October 2, 2023 05:18
@briodan
Copy link
Author

briodan commented Oct 2, 2023

Can you change the target to the develop branch ? It's better

Thanks :)

done

getting-started/installation.md Outdated Show resolved Hide resolved
@briodan briodan requested a review from rejas October 13, 2023 20:37
getting-started/installation.md Outdated Show resolved Hide resolved
@@ -14,18 +14,18 @@ installers can be found under:

## Manual Installation

These instructions deploy a standalone version of Magic Mirror, for [Server Only](/getting-started/installation.html#server-only) and [Client Only](/getting-started/installation.html#client-only) installs please read the install specific instructions below

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rejas last time you lintered the lines to a max. length, will you do this here before/after merge?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after merge I will lint again

3. Replace
`DISPLAY=:0 npm start`
with
`DISPLAY=:0 npm server`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm server this will not work, must be npm run server

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its running for me with npm server changed it to npm run server and didn't see any difference. but i'll admit i don't fully understand how this works, just documenting what i had to do to get it working :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also say, that npm server does not work for me (or in general as far as i know). Only a few scripts work out of the box, like start and test

Maybe you got some shortcuts somewhere, but please update here to use "start"

getting-started/installation.md Show resolved Hide resolved
getting-started/installation.md Outdated Show resolved Hide resolved

To always start MagicMirror² in server only mode you need to edit the `installers/mm.sh` file otherwise it will start in full mode after a reboot:

1. Backup mm.sh: `cp installers/mm.sh installers/mm.sh.bak`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rejas don't know anything about this mm.sh stuff, totally irrelevant when using docker, so is this a standard setup or how should we document it here?
Found in mm.sh this line

# This file is still here to keep PM2 working on older installations.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mm.sh file is removed on develop so installers/mm.sh will not exist anymore with next release. This file will be part of sam's script repo.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please remove the stuff about mm.sh

@rejas rejas requested a review from khassel July 8, 2024 21:23
@khassel
Copy link
Collaborator

khassel commented Jul 10, 2024

@rejas how are develop and master working in this repo?

develop is behind master so reviewing stuff based on this is waste of time for me. Have we a concept how to handle diverging of these branches?

@rejas
Copy link
Collaborator

rejas commented Jul 11, 2024

maybe we should merge master regularly back into develop (or everytime master gets some updates) so that this wont happen?

@khassel
Copy link
Collaborator

khassel commented Jul 11, 2024

maybe we should merge master regularly back into develop (or everytime master gets some updates) so that this wont happen?

we should do it everytime master gets some updates, I did it now (with the expected result of merge conflicts in this PR).

@sdetweil
Copy link
Collaborator

we also need to remove the comment doesn't work over ssh.. as we fixed that a long time ago

@briodan
Copy link
Author

briodan commented Jul 12, 2024

resolved the conflicts and removed the ssh comment.

@khassel
Copy link
Collaborator

khassel commented Jul 12, 2024

resolved the conflicts and removed the ssh comment.

Thanks!

As already mentioned in the comments above: The mm.sh file is removed on develop so installers/mm.sh will not exist anymore with next release. This file will be part of sam's script repo.

So I think the 2 sections beginning with To always start MagicMirror² in xxx mode you need to edit the installers/mm.sh file ... should be removed.

But I'm open to other approaches.

@briodan
Copy link
Author

briodan commented Jul 12, 2024

So should this really be a PR against develop? The intent of this PR when initially submitted was to document running server and client mode based on the way things worked at the time and I guess still will until the next release.

Since there is new functionality coming up in the future would it make sense to merge this into master to get current state documented, and setup another PR in develop to update the documentation based on new functionality?

Or would it make sense to just close this PR and set up a new one that accounts for functionality changes from scratch.

@khassel
Copy link
Collaborator

khassel commented Jul 12, 2024

I would go for documentation for next release and omit the mm.sh stuff.

We can stay on develop and if it fits for master too I will "copy" it (in git wording: cherry pick) to master.

@rejas
Copy link
Collaborator

rejas commented Oct 31, 2024

@briodan can you update your branch and resolve the conflicts so that we can get this PR into our code?

@rejas rejas changed the base branch from develop to master November 4, 2024 06:45
3. Replace
`DISPLAY=:0 npm start`
with
`DISPLAY=:0 npm server`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can also say, that npm server does not work for me (or in general as far as i know). Only a few scripts work out of the box, like start and test

Maybe you got some shortcuts somewhere, but please update here to use "start"


To always start MagicMirror² in server only mode you need to edit the `installers/mm.sh` file otherwise it will start in full mode after a reboot:

1. Backup mm.sh: `cp installers/mm.sh installers/mm.sh.bak`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please remove the stuff about mm.sh

@@ -14,18 +14,18 @@ installers can be found under:

## Manual Installation

These instructions deploy a standalone version of Magic Mirror, for [Server Only](/getting-started/installation.html#server-only) and [Client Only](/getting-started/installation.html#client-only) installs please read the install specific instructions below

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after merge I will lint again

@sdetweil
Copy link
Collaborator

sdetweil commented Nov 4, 2024

there is one install
and 3 execution modes
full , npm start , or npm run start
server, npm run server
client , npm run client

only the start script has a shortcut to not require the word run

installers/mm.sh was removed from the MagicMirror package and taken over by my scripted installer

@briodan
Copy link
Author

briodan commented Nov 4, 2024

This PR was written over a year ago to document how client and server mode were working at the time, with the Q4 release that changed the way things work for MM I don't know how much of this PR is still valid and I don't have the cycle to test it.

I updated my branch to latest, but beyond that I'll let others take this forward and update the documentation if still required.

@rejas
Copy link
Collaborator

rejas commented Nov 5, 2024

I updated my branch to latest, but beyond that I'll let others take this forward and update the documentation if still required.

Thanks for your work, Ill take it upon me to finish the PR. Alas, you seem to have worked on your master branch and I cannot push to that it seems :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

client mode instructions unclear
9 participants