linuxserver / docker-raneto

GNU General Public License v3.0
17 stars 4 forks source link

[BUG] user configuration is ignored #19

Closed unmacaque closed 1 year ago

unmacaque commented 1 year ago

Is there an existing issue for this?

Current Behavior

With the most recent image tag including the changes from #18, any user-supplied configuration is still ignored and Raneto always starts with the default settings.

This makes it impossible to change settings, such as content_dir to something else.

My suspicion is this was caused by this commit in ryanlelek/Raneto. With that, there is now always a default server.js in /app/raneto, which means this line in docker-raneto will always evaluate to false, meaning that server.js will not be copied, thus user config will not be used.

Expected Behavior

User supplied configuration in /config should be honoured

Steps To Reproduce

  1. Start a new container
  2. Enter container, edit /config/config.default.js and edit a configuration key, like site_title
  3. Exit and restart container
  4. Navigate to localhost:3000 in a browser and observe that the window/tab title has not changed

Environment

- OS: Synology DSM 7.1
- How docker service was installed: via Synology Package Manager

CPU architecture

x86-64

Docker creation

docker run --rm -d -p 3000:3000 --name raneto -v test:/config linuxserver/raneto:0.17.3

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

[custom-init] No custom files found, skipping...
[ls.io-init] done.
GET / 200 159.238 ms - 6288
GET /lib/highlightjs/styles/solarized_light.css 200 56.608 ms - 1597
GET /lib/jquery/dist/jquery.min.js 200 50.083 ms - 89664
GET /styles/ghostdown.css 200 58.928 ms - 10582
GET /styles/raneto.css 200 58.863 ms - 2411
GET /lib/bootstrap/dist/css/bootstrap.min.css 200 52.528 ms - 162264
GET /lib/popper.js/dist/umd/popper.min.js 200 59.317 ms - 21233
GET /lib/fitvids/dist/fitvids.min.js 200 7.919 ms - 3535
GET /lib/bootstrap/dist/js/bootstrap.min.js 200 14.656 ms - 62563
GET /scripts/raneto.js 200 11.834 ms - 4921
GET /scripts/ghostdown.js 200 18.338 ms - 254264
GET /lib/highlightjs/highlight.pack.min.js 200 9.535 ms - 749329
GET /lib/masonry-layout/dist/masonry.pkgd.min.js 200 33.294 ms - 24103
GET /translations/en.json 200 2.378 ms - 1537
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thespad commented 1 year ago

Good catch, I'll PR a fix

thespad commented 1 year ago

Could you test lspipepr/raneto:0.17.3-pkg-6e89e859-pr-20 please, and see if it fixes the issue for you?

If you've deployed the latest version clean you will have to delete the existing config.default.js or you'll get errors related to the theme path.

unmacaque commented 1 year ago

Can confirm that using the image lspipepr/raneto:0.17.3-pkg-6e89e859-pr-20 picks up my configuration again. Thanks a lot for fixing!