Giter Club home page Giter Club logo

Comments (15)

esturniolo avatar esturniolo commented on May 16, 2024 3

The docker container includes a webserver, it's ready to use.
To mount the config.yaml, you can use -v your-config.yml:/www/config.yml
Here is a full example:

sudo docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest

Hi again @bastienwirtz.
I tried with your example and I've the same results:

image

As you can see, I've config.yml (with the proper code inside) but docker can't mount a file.

from homer.

bastienwirtz avatar bastienwirtz commented on May 16, 2024

Hi @esturniolo!

Nothing stupid! You are not alone: #14
As the config is loaded over AJAX requests, you need a webserver to use it (some option available in the issue thread I linked). I have to update the readme to mention that!

from homer.

esturniolo avatar esturniolo commented on May 16, 2024

Hi @bastienwirtz, thanks for the answer.
I thougth that.
The docker image needs a webserver too?
Because should be great to use everything inside docker, but...
I tried to use it, but I can't mount the config.yaml as a volume.

So here I'm again.

from homer.

bastienwirtz avatar bastienwirtz commented on May 16, 2024

The docker container includes a webserver, it's ready to use.
To mount the config.yaml, you can use -v your-config.yml:/www/config.yml
Here is a full example:

sudo docker run -p 8080:8080 -v /your/local/config.yml:/www/config.yml -v /your/local/assets/:/www/assets b4bz/homer:latest

from homer.

codywarmbo avatar codywarmbo commented on May 16, 2024

I am having the same issue. If I manually create config.yml beforehand I just get a blank page.

from homer.

bastienwirtz avatar bastienwirtz commented on May 16, 2024

That might be either a malformed yaml or just a missing key.

  • malformed yaml: You can validate the yaml formatting using for example this: http://www.yamllint.com/.
  • Missing configuration key: I just updated homer to handle missing config keys and default value, so this should not happened anymore.

@esturniolo @warsix4 : Anyway, I recommend to try with the latest version (from yesterday), let me know how that works for you !

from homer.

frederickbeaulieu avatar frederickbeaulieu commented on May 16, 2024

Hi,

I am using this image on synology (updated 4 days ago at the time of posting).

I downloaded the zip file from your repo and then pasted the config.yml.dist file and the assets folder on my synology.

Annotation 2020-06-03 161223

Annotation 2020-06-03 161840

Now if I try to mount the assets folder to the Docker everything seems find. But if I try to mount the config file so I can modify it easily I get the same API error @esturniolo get.

Annotation 2020-06-03 161014

Start container HomePage-Homer failed: {"message":"OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:59: mounting \\\"/volume1/docker/Homer/config.yml\\\" to rootfs \\\"/volume1/@docker/btrfs/subvolumes/27c509b7f3e36c1b7b7ea134b7d6196234552751e20ffc23beef4c933126d556\\\" at \\\"/volume1/@docker/btrfs/subvolumes/27c509b7f3e36c1b7b7ea134b7d6196234552751e20ffc23beef4c933126d556/www/config.yml\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type"}.

I confirmed the .yml with your tool and it's valid.

from homer.

JamiePhonic avatar JamiePhonic commented on May 16, 2024

Based on the error output you provided, it looks like it could be an issue with synology's docker implementation that if you're passing in a file, it expects the "mount path" just to be the directory you want that file placed in and not an absolute path?

Try changing your mount path for config.yml to just "/www/" and see if that works?

from homer.

frederickbeaulieu avatar frederickbeaulieu commented on May 16, 2024

Try changing your mount path for config.yml to just "/www/" and see if that works?

Tried that already, but the files does not appear after I mount /www. It works with other docker images like bitwarden or code-server when I mount their /config folder, but Homer does not seem to work.

from homer.

klejejs avatar klejejs commented on May 16, 2024

I think it is because of the permissions of docker container. It uses its own user with its own uid and gid, not system users which means that it doesn't have permissions to access the files you create with your local user accounts.

I can't currently specify any specific issues but I think there are a few ones connected to the same issue.

from homer.

JamiePhonic avatar JamiePhonic commented on May 16, 2024

Turns out Synology have a Demo site for their DSM UI (https://demo.synology.com/en-uk/dsm)
I downloaded the docker plugin on it, created the container and it started without any problems.
I uploaded the config.yml to the docker/homer folder through the DSM file manager (maybe that had something to do with it?)
image

Here's the config i used, expored as a JSON file from the docker app in DSM.
Try deleting the container all together and re-importing this one. I made sure to use the same file paths you did in the screenshots above.

Copy and paste this code into a text file and save it as homer.json, then in the docker app in DSM, select "Containers", then the "Settings" button and "import"
(You'll need to add the port bindings once its running. i forgot to add them while i was testing!)

{
   "cap_add" : null,
   "cap_drop" : null,
   "cmd" : "",
   "cpu_priority" : 50,
   "devices" : null,
   "enable_publish_all_ports" : false,
   "enable_restart_policy" : false,
   "enabled" : true,
   "entrypoint_default" : "darkhttpd /www/ --no-listing",
   "env_variables" : [
      {
         "key" : "PATH",
         "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
      },
      {
         "key" : "USER",
         "value" : "darkhttpd"
      },
      {
         "key" : "GROUP",
         "value" : "darkhttpd"
      },
      {
         "key" : "GID",
         "value" : "911"
      },
      {
         "key" : "UID",
         "value" : "911"
      }
   ],
   "exporting" : false,
   "id" : "85cc142507e8dbc596798729e8bddc6e5e6e26cbbcc9858a145ac61dcf463241",
   "image" : "b4bz/homer:latest",
   "is_ddsm" : false,
   "is_package" : false,
   "links" : [],
   "memory_limit" : 0,
   "name" : "b4bz-homer1",
   "network" : [
      {
         "driver" : "bridge",
         "name" : "bridge"
      }
   ],
   "network_mode" : "bridge",
   "port_bindings" : [],
   "privileged" : false,
   "shortcut" : {
      "enable_shortcut" : false
   },
   "use_host_network" : false,
   "volume_bindings" : [
      {
         "host_volume_file" : "/docker/Homer/config.yml",
         "mount_point" : "/www/config.yml",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/Homer/assets",
         "mount_point" : "/www/assets",
         "type" : "rw"
      }
   ]
}

from homer.

frederickbeaulieu avatar frederickbeaulieu commented on May 16, 2024

Aright, well, thanks alot for the time you spent investigating this and sorry for the late reply, I had something.

Result :

  • I tested your config file and it worked. 👍
  • Tried to redo my setup to compare the 2 files....and it worked...

Now, I think the only thing I did different is renaming the config.ylm file from config.ylm.dist before uploading and not after. Not sure if that was the problem.

btw @JamiePhonic How did you get the UI in dark mode on Synology? Never found that option. Theme config only seems to be for taskbar / widgets.

from homer.

JamiePhonic avatar JamiePhonic commented on May 16, 2024

@frederickbeaulieu well that's weird, but at least it's fixed!

I use a plugin on Firefox called Dark Reader
It'll attempt to intelligently apply a dark mode theme to every website. Evidently it figured out synology DSM and I didn't even notice!

from homer.

bastienwirtz avatar bastienwirtz commented on May 16, 2024

Hi there!

I added config.yml fetching & parsing error handling, if anything like thing happen again, an error will be displayed intead of a white page, that should help! I also updated the documentation (README.md) to try to make things easier.

Last but not least: I just created a Gitter chat that might be more efficient to help each other setting up our dashboards!

from homer.

bastienwirtz avatar bastienwirtz commented on May 16, 2024

If I understand correctly this issue is resolved, so I'm closing it, but feel free to reopen it if necessary!

from homer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.