-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Added Docker support for server only mode #673
Conversation
README.md
Outdated
#### Manual | ||
|
||
1. Download and install the latest Node.js version. | ||
2. Clone the repository and check out the beta branch: `git clone https://github.com/MichMich/MagicMirror` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should set master branch here not beta.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? Where did I use the "beta" branch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, beta branch isn't use anymore. When you do it a checkout from url is used master branch. Just change the beta by master.
This is change done few days ago
a591cf1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh now I see what you mean. Sorry. I just copied it from line 40. Should I change it there too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
README.md
Outdated
@@ -46,8 +46,41 @@ curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installer | |||
**Note:** if you want to debug on Raspberry Pi you can use `npm start dev` which will start the MagicMirror app with Dev Tools enabled. | |||
|
|||
### Server Only | |||
In some cases, you want to start the application without an actual app window. In this case, you can start MagicMirror² in server only mode. This will start the server, after which you can open the application in your browser of choice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No remove reference to command node serveronly
some users can be not understand how run the mode server only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it this change. After this can be take the next step mentioned on forum by @morozgrafix
https://forum.magicmirror.builders/post/12602
There some little things are need to change.
@bastilimbach Please add your changes to the Thanks for your contribution! |
js/defaults.js
Outdated
@@ -8,7 +8,7 @@ | |||
*/ | |||
|
|||
var defaults = { | |||
port: 8080, | |||
port: process.env.MM_PORT || 8080, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MichMich I did run grunt before and couldn't figure out what the problem was. jsLint says there are irregular whitespaces but there aren't any. Or am I completely wrong here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After MM_PORT there a stranger space. Irregular whitespace. In character 30. Add a normal space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange. But it worked. Thanks 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various whitespace characters can be inputted by programmers by mistake for example from copying or keyboard shortcuts. Pressing Alt + Space on OS X adds in a non breaking space character for example.
http://eslint.org/docs/rules/no-irregular-whitespace
Nice work! Thanks! |
@bastilimbach Looks like this change is causing black screen on load when starting MM with
I believe that culprit is 354b745#diff-75953debd6cf3faf33d4ff10e8353645R11 More details https://forum.magicmirror.builders/post/13221 |
Any progress on this? Would be nice to get updated Docker images at Docker Hub |
@fewi For now you can just use the |
@fewi @MichMich Yeah, you can checkout the docker build -t magic_mirror . After building the image, run a container with this image by executing: docker run -d \
--publish 80:8080 \
--restart always \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--name magic_mirror \
magic_mirror You might want to change the volume paths. |
Yesterday I was trying to build & run it on my windows machine. But it did not work. I made a PR to fix this #743 |
Hello everybody, |
I added a Dockerfile and some additional docker related files to support the deployment of the server only mode using Docker.
@MichMich to make the shell command work you need to create an account at Docker Hub and link this repository to it. So every time the Github Repo gets updated, the Docker Image will be rebuild and updated automatically.
Is it correct to add my changes under the "## [2.1.0] - 2016-12-31" section of the changelog?