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

Wrong 'main color' picked up when running multiple OctoPrint instances on he same server. #132

Closed
joris57 opened this issue Jul 2, 2017 · 12 comments

Comments

@joris57
Copy link

joris57 commented Jul 2, 2017

I am running multiple instances of OctoPrint on different ports of the same (Ubuntu) server. To differentiate between them, I set a different 'appearance' color in OctoPrint.

In TouchUI, I set a matching 'main color'.

However, this color is not correctly displayed in Chrome (usually the same color from one of the three instances is displayed for all 3 instances). The 'regular' interface picks up the 'appearance' color correctly.

@BillyBlaze
Copy link
Owner

Thanks for reporting, sorry but this is simply not possible since the code was not made with the intention of having multiple instances on one OctoPrint.

To support this; It would require a major refactoring of the code on the backend-end (Python) and the mechanism on the front-end (Javascript) that compiles the LESS files into a CSS file.

However, since I don't have much time on my hands at the moment, I can't implement this soon. I also needs some "standard documentation" about setting up multiple instances so I can rely on a consistent mechanisme for storing the and serving the right compiled CSS file.

@joris57
Copy link
Author

joris57 commented Jul 8, 2017

Thanks for considering this.

Instructions for setting up multiple instances can be found here : https://github.com/foosel/OctoPrint/issues/113. This is the only 'standard' I have found.

Note that TouchUI seems in general to work well for multiple instances, with exception of this color issue.

@gdachs
Copy link

gdachs commented Dec 6, 2017

You could use a docker container with octoprint inside. You can start multiple containers with just different ports. They will have their own file systems, so different colors would be no problem.

@BillyBlaze
Copy link
Owner

Thanks for posting @gdachs, this is a very good alternative, therefor I am closing this issue.

Once OctoPrint officially support multiple instances I am willing to reconsider any changes needed with customization.

@joris57
Copy link
Author

joris57 commented Dec 13, 2017

I understand that the developer does not want to put in significant effort for the implementation of what certainly is merely a cosmetic issue, but calling having to learn about 'docker' a 'very good alternative' is cutting it a bit short.

@BillyBlaze
Copy link
Owner

yeah, your right. After reconsidering it, I think I could easily fix this by appending OctoPrint's port number to the filename. You do run the same instance on two different ports right?

@BillyBlaze BillyBlaze reopened this Dec 13, 2017
@joris57
Copy link
Author

joris57 commented Dec 14, 2017

I'm not sure if I interpret 'instance' in your question correctly, but I guess the answer is 'yes'.

I'm starting the 'octoprint' daemon multiple (3 at the moment) times with a different basedir, config file and port.

@BillyBlaze
Copy link
Owner

Yeah, I meant OctoPrint instances. I could write the customization for each instance to a file like touchui.custom.5000.css instead of touchui.custom.css. That wouldn't require a lot of refactoring too. Most of the pain is going to be in migrating old settings and files into new ones that also include the port.

Anyhow; I'll add this in the next release.

@stale
Copy link

stale bot commented Jan 15, 2018

This issue has been automatically marked as inactive because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Jan 15, 2018
@BillyBlaze
Copy link
Owner

Sorry, was adding a new bot to github, you can ignore what he said ofcourse.

@BillyBlaze
Copy link
Owner

Thanks, this has been released in 0.3.12

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants