I’m new to Yunohost. It is a great peace of software.
I have installed it on a VPS and everything works proberly.
My Problem: I need a few more Applications. Which are not available as app,
for example groupoffice. I’m not able to make a app package.
For testing I installed Portainer as Container with port 9000. Serverip:9000 works great.
And now I need to make a sub.domain and forward it intern to the docker Container.
I try it with the redirect app. I have a dashboard icon. And that redirect to the portainer
Login Page. But I can’t login. The same with Ajenti I installed (no docker) when I log in
the Site freezes.
Is this a buck in the redirect app?
What are right settings in the redirect app? (I use http://127.0.0.1:port proxy invisible)
Is there a better way to make Container available as sub Domain and in the portal?
What is the right way to get a certificate for the docker applications?
(SSO is not so important)
Hello, I’m using YunoHost and I’m also in search of a ‘how-to-guide’ on installing additional applications using docker containers, preferably linking them to the YunoBoard-dashboard (through the Redirect-app, if I am correct?). I managed to install the Portainer-app on YunoBoard, I downloaded an application image (ex: metabase), and created a container using this downloaded image.
Now… I’m stuck I have been looking around on different fora to find pointers on how to move forward, but no luck until now. Do you have a clue on how to make the app (metabase in this case) usable & integrate it in the YunoBoard dashboard? If this thread prooves succesfull at some point, we could make a short ‘DIY-HowTo’-guide for the YunoBoard-wiki maybe…
Cool, thanks for your fast answer! In the meantime I stumbled upon this thread, with some more pointers on how to move forward. However, I’m not really used to work with docker and specifically redirect urls & ports, so on that part I hope the author is willing to write a short summary of steps to take… I realize the open source way of things is ‘learning by doing’, so I will also try to get up speed with the extra information provided there.
go to portainer. depending if you have a stack or a single container (prob the latter) go to that and click add stack or add container.
fill out deets as needed. for stack, your compose file, for container your name (thing here) and image from docker hub. click publish all ports
You’ll have to look at an individual container to see what port they publish on. sometimes it’s like a random number that wont conflict with your YNH setup, but if it’s like 80 or 25 you need to change it with “port mapping” so like 9283:80
I did a lot of tinkering of where the volume went but I don’t think any of it was needed, portainer and YNH should take care of that. volume is where on your server it goes. i cant give advice
6, go back to ynh. install the redirect app on whatever domain you set for this
cross your fingers and hope it works. sometimes things do, sometimes they just don’t work. try googling around if not, with errors from the docker logs. sometimes env tweaking fixes it sometimes not. I don’t know enough to give advice why
Wonderful, thanks a lot for your writeup! And even nicer, it worked out! It feels like magic And thanks to your example and deployment I kind of start to understand the role of ports (on a very brief/meta-level), they redirect towards a ‘place’ on the webserver, without the need for using url’s? Maybe this is not the place for that kind of questions, in brief: you helped me (and hopefully others) a lot, thanks!
Next step will be to understand how to configure databases (mysql, postgres, …) used by different applications, and how those interact with YunoHost. I guess that is where the ‘magic’/knowledge of contribution and verification of indexed/official YunoHost packages happens… ?
Litteraly, a port is a door where communication happens. It can be web communication (like serving a webpage, an API, etc.), email, websocket, whatever way a software communicates with other software.
You can install whatever you want within Docker, YunoHost does not care very much what happens in there. We could imagine having YunoHost packages for Docker apps, as they are only a list of Bash commands, but containerization is not YunoHost’s focus.
Hence this tutorial, to understand how to serve Docker’s ports with YunoHost’s Redirect app.
You can find this information on Docker tutorials. As said above, YunoHost does not mind about what is happening within Docker. It only needs to step in whenever you want to make a port available to the outside.
…but suddenly I now get 502 Bad Gateway NGINX errors for all of the applications and the procedure above does not work anymore. I can’t rule out the reason for that, but I assume this has to do with the ports/ip’s and the link with nginx proxy manager, as explained by @jensensen2:
As background info, from Diagnosis & cron email notifications (maybe this rules out - I don’t hope ‘add’ :p) some issues:
Backports: It looks like apt (the package manager) is configured to use the backports repository. Unless you really know what you are doing, we strongly discourage from installing packages from backports, because it's likely to create unstabilities or conflicts on your system
The system has only 44 MiB (2.0%) RAM available! (out of 1.9 GiB)
Some processes were recently killed by the system because it ran out of memory. This is typically symptomatic of a lack of memory on the system or of a process that ate up to much memory. Summary of the processes killed: java (x2) python (x1) ruby2.5 (x1)
First you should make sure Huginn is running alright within the container itself. Refer to its documentation to do so.
Regarding the Diagnosis warnings you are getting, only the RAM one seems problematic for the matter at stake. Running multiple Docker containers, Java apps and Ruby apps on a 2GB RAM system seems a tad optimistic. And as you see, Linux has already chosen to kill some processes to save itself.
Hmm ok, I see… I might need to start reducing my footprint a little bit before continuing the experimentation journey I installed NetData, and under the heading ‘Applications’ is see that sql is eating up most of the cpu/memory space. I’m primarily testing out some applications, so I’ll remove some of them…
Do you know if there is a fast trick/tool that can help in pointing out which YunoHost/Portainer-applications do use most of the RAM/memory and/or CPU (sql) ? (aligns a bit with this thread, but I didn’t find the answer to that question there. With a disclaimer: I don’t want to take advantage of asking relentlessly any question I bump into, I am already very happy with the info you gave!)
EDIT: It seems like switching the Portainer-containers off does reduce considerably memory-usage… So I might stick to official YunoHost-applications for the moment, I guess they are better integrated in the system?
Ok I see, I was wondering about that as well… (not only for Docker, but also within other frameworks: conda environments, etc… if that can be compared to some extent). As I work primarily on climate change, I would also like not to create unnecessary server activity… But that’s a larger discussion with some trade-offs to make I guess On that note, I like a lot the (i) content and (ii) approach of solar.lowtechmagazine.com. I guess in the server-world similar reflections/activities are ongoing, but I have still quite a learning curve to go to properly understand them