szabodanika / microbin

A secure, configurable file-sharing and URL shortening web app written in Rust.
https://microbin.eu
BSD 3-Clause "New" or "Revised" License
2.65k stars 163 forks source link

[Feature Request] Add MicroBin to the Unraid Community Apps. #48

Closed moritz-john closed 1 year ago

moritz-john commented 2 years ago

My feature request is a very easy to install version of MicroBin on the Unraid Community Apps.

I tried to do it myself but I have very little knowledge with Docker, Docker Hub or how to officially add an app to the Unraid CA:

2022-08-15_11-50

I clicked on ADD CONTAINER in the Unraid docker GUI and added the following: Name: microbin Repository: solarft/microbin

I added a new port: WebUI: Container Port: 8080 Host Port: e.g. 7123

I added a new path: Data Path: Container Path: /usr/local/bin/pasta_data Host Path: /mnt/user/appdata/microbin/data/

As you can tell from the screenshot, basic functionality works and I can access, create and save new pasta in my local network.


I don't know if solarft/microbin is the official MicroBin docker hub repository, there were about 4 different ones and I tried them until one worked.

Also I have no idea how to pass command line arguments like --highlightsyntax. I tried many things but none of them worked.


I've done what I can and failed, maybe someone else is able to fulfill this feature request.

Thank you!

szabodanika commented 1 year ago

We have a new official DockerHub image (see #49). Personally I have not used Unraid Community Apps before but I will have a look if I can make the worfklow easier. You can also give it another try, maybe the command line arguments work now with the changed Dockerfile. Otherwise I will have a look as I really want to get the arguments working on Docker.

abyss commented 1 year ago

Microbin is in Unraid Community Apps under Joshdroids Repository - using the official dockerhub image, as well. His Unraid support thread is here: https://forums.unraid.net/topic/112086-support-joshndroids-docker-repo-support-thread/ - and you can easily find it in CA by searching microbin. I'm currently using it in my environment successfully.

The only way to use arguments with Docker is to make them environment variables (the standard pattern), or modify the Dockerfile (which means building your own image and making it available for use). Thankfully, https://github.com/szabodanika/microbin/pull/34 has made all (most?) of the options env vars, and this works perfectly fine for me with the current image!

All that is currently missing is some basic documentation of the options, but the general idea is:

Naming of the environment variable is "MICROBIN_" + the name of the option in all caps. (eg. MICROBIN_HIGHLIGHTSYNTAX), and set it to "true"

@moritz-john or @szabodanika I think you can close this issue as resolved :)

moritz-john commented 1 year ago

image

So it got added Sep 30, 2022 to the Unraid CA. Nice :)

@abyss Thank you for pointing that out - I had not checked since creating my feature request on Aug 15, 2022. Also thank you for your small tutorial on how to add environment variable to MicroBin in Unraid.

@szabodanika Thank you for updating me some days ago.

I'd also consider this "issue" resolved/closed.

EDIT: Maybe the Unraid CA could be even added here as an installation method.

szabodanika commented 1 year ago

@szabodanika note to self: add a mention of this to README.MD