dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] Multi-Page Support , can´t get it to work.

Open ostgardh opened this issue 2 years ago • 41 comments

Environment

Self-Hosted (Docker)

System

Docker

Version

Version: 20.10.21

Describe the problem

I have add

pages:
- name: Work Stuff
  path: 'work.yml'

And make work.yml file

I can see Pages link in Dashy, but If I click on "Work Stuff" I coming to url: "http:mypage/home/work-stuff" But is not working. I see same page as conf.yml... And If I reload I get "Cannot GET /work-stuff"

work.yml file is mounded in docker and have r&w. I don´t understad if I have make something wrong or if this is bug???

Additional info

No response

Please tick the boxes

ostgardh avatar Dec 08 '22 14:12 ostgardh

If you're enjoying Dashy, consider dropping us a ⭐
🤖 I'm a bot, and this message was automated

liss-bot avatar Dec 08 '22 14:12 liss-bot

which dir is work.yml mounted in? for the filename only syntax to work it needs to reside in public:

The path (local or remote) to the config file to use.
For files located within /public, you only need to specify filename, for externally hosted files you must include the full URL

https://dashy.to/docs/configuring#pages-optional

** Configuring | Dashy ** All app configuration is specified in /public/conf.yml which is in YAML Format format. If you're using Docker, this file can be passed in as a volume. Changes can either be made directly to this file, or done through the UI. From the UI you can also export, backup, reset, validate and download your configuration file.

Same as conf.yaml
/app/public/work.yml

All app configuration is specified in /public/conf.yml which is in YAML Format format. If you're using Docker, this file can be passed in as a volume. Changes can either be made directly to this file, or done through the UI. From the UI you can also export, backup, reset, validate and download your configuration file.

ostgardh avatar Dec 15 '22 10:12 ostgardh

Same experience. Have the additional page in the same folder as the config.yml Not working.

kozoke avatar Dec 25 '22 19:12 kozoke

Same experience. Not working.

pcl11 avatar Dec 25 '22 22:12 pcl11

same issue here.

I had a look into the routing code and found that the logic builds routes based on page "type" (home =default; workspace; dev) but i have not found any way for users to specify the page type in the configs. Might be the issue there.

Also @Lissy93 may i suggest some fix to clearify and easy up multi-page Support: Basicly i see two paths that would solve these multipage problems. A) If page types should be kept, you might extend the needed configs for a sub-page to [name, path, type] and force a type folder (home, dev, etc) within the public forder with the config declared in the path. B) You might drop the page types and let the routing be created on the domains root (for example https://hostna.me/sub-page-name-with-replaced-whitespaces). I see a lot of confusion (especially in the docker community) where to place (and in extend, create volumes to) the sub-page configs.

To serve a common use case: I want to create a sub-page to seperate admin related sections from family used, none admin sections.

Sadly, i am not skilled enough in js and vue to have a try for the fix myself. So @Lissy93 would be nice for us docker heads to check this issue. Thanks in advance.

4lexKidd avatar Dec 28 '22 14:12 4lexKidd

For me it is also not working.

docker-compose.yml:

version: "3.8"
services:
  dashy:
    # To build from source, replace 'image: lissy93/dashy' with 'build: .'
    # build: .
    image: lissy93/dashy
    container_name: dashy
    # Pass in your config file below, by specifying the path on your host machine
    volumes:
    - /share/CACHEDEV1_DATA/docker/dashy/conf.yml:/app/public/conf.yml
    - /share/CACHEDEV1_DATA/docker/dashy/nas.yml:/app/public/nas.yml
    ...

conf.yml:

...
pages:
  - name: NAS
    path: nas.yml

Clicking the NAS button does nothing, opening in new tab gives 'Cannot GET /home/nas'

schniggie avatar Dec 29 '22 00:12 schniggie

Same bug in 2.1.1. I try the same configs with 2.1.0 and in this version pages work. I use docker version.

semhoun avatar Jan 05 '23 19:01 semhoun

So I had the same issue , I fixed it by setting routingMode to hash. I am using docker.

bodrick avatar Jan 07 '23 13:01 bodrick

I got the same problems, it's very frustrating because there is no error message and no logs ... (or I didn't find them).

For me, the problem was in my file for the new page, some syntax problems (in widgets, the "limit: 60" in "type" instead of 'options'.

I can suggest you to try with some examples and when you have a page who work, do changes carrefully!

(using Docker version 20.10.3, build 55f0773)

Dylan-Bs avatar Jan 17 '23 01:01 Dylan-Bs

Same experience. Not working.

Thomas-Arildtoft avatar Jan 18 '23 18:01 Thomas-Arildtoft

Was having the same issue, turns out I needed to change the command below so it rebuilds/indexes the files. Now my image folder and custom pages are working.

https://dashy.to/docs/developing/#alternate-start-commands

'yarn' 'start'
to
''yarn' 'build-and-start'

image

This article outlines how to get Dashy running in a development environment, and outlines the basics of the architecture.

Fiala06 avatar Jan 18 '23 19:01 Fiala06

Don't know if this is related to same issue or not I can't open dashy/home either, getting "Cannot GET /home" Adding pages also gives "Cannot GET /home/test"

dashy only opens at http://ip:port and not http://ip:port/home or http://ip:port/home/test or http://ip:port/test

http://ip:port/test.yml shows the test page config yml

Edit: changing start command as @Fiala06 suggested solve the issue

Edit 2: Back to square one, changing command not fixed it permanently, it just keeps rebuilding and make it unavailable.

papampi avatar Jan 23 '23 09:01 papampi

same issue, anyone have an resolution?

gavinpoynton avatar Jan 27 '23 15:01 gavinpoynton

I did run into the same issue in raspberry pi 3B, In my case, it has something to do with memory issues during build. I fix it by doing the following.

  1. Created a swap space with size of 4G
  2. Added NODE_OPTIONS in the environment section of docker-compose.yml file.
    # Set any environmental variables
    environment:
      - NODE_ENV=production
      - NODE_OPTIONS=--max_old_space_size=4096
  1. File setup
volumes:
      - /home/sailhenz/dashy:/app/public/
      - /home/sailhenz/dashy/pages:/app/public/pages
  1. Run docker-compose up
  2. Rebuild using webapp (note: I didn't change the yarn command so it's still using yarn start)

sailhenz avatar Feb 15 '23 13:02 sailhenz

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

liss-bot avatar Mar 19 '23 01:03 liss-bot

For me the problem still exists. Tried all suggestions from above. Nothing solves it for me.

schniggie avatar Mar 19 '23 10:03 schniggie

Facing same issue. Very Tricky to debug. Tried Rebuild from UI but its also failing. I am running dashy in Docker.

amanhigh avatar Mar 21 '23 16:03 amanhigh

same issue. I am running dashy in Docker.

phmassa avatar Mar 23 '23 09:03 phmassa

@Fiala06 is right! Here are the steps I have taken:

  1. Make sure all .yml files for each page are correct and there are no yellow triangles in config.
  2. Mount the folder which contains .yml files to /app/public/
  3. Mount my.config to /app/public/conf.yml.
  4. Set PUID and GUID.
  5. Set NODE_ENV=production.
  6. Following Fiala06's screenshot, override command with 'yarn' 'build-and-start' in portainer.
  7. Go to the dashy page: 7.1 Log in as an administrator 7.2 Press ctrl+r to refresh 7.3 At this point, dashy should start reporting errors 7.4 Open the log of Dashy in Portainer, and you can see that Dashy is reporting an error and starting to compile. 7.5 Wait a moment, when the compilation is complete, just return to the Dashy page, everything is great~~~~~~

yglory avatar Mar 31 '23 18:03 yglory

Same experience. Not working.

jiakme avatar Apr 04 '23 09:04 jiakme

I had similar issues finding a method to get pages working. This is what worked for me:

  1. Ensure you have mapped the newly created .conf file that has been created - this is done within the docker run command or docker-compose file eg docker run -v ./dashy/conf.yml:/app/public/conf.yml
    -v ./dashy/newconf.yml:/app/public/newconf.yml
    eg docker-compose volumes:

    • ./dashy/conf.yml:/app/public/conf.yml
    • ./dashy/newconf.yml:/app/public/newconf.yml
  2. You will obviously need to bring the container down and up again eg docker compose down docker compose up

  3. Once this is done, I created the additional page entry through the UI - Edit Mode ->Edit Pages ( I did this as editing the conf.yml file directly didn't seem to work)

  4. Finally you then need to run the 'Rebuild Application' under the configuration options within the UI or use 'yarn' 'build-and-start'

After following this process I now have multiple working pages. If you make changes to the sub pages I've found that a rebuild is necessary to reflect the changes in the UI.

symphoniccow avatar Apr 09 '23 04:04 symphoniccow

I have tried every thing here remote pages and local pages I just a 404 error or it loads the yml code. I'm at a loss with this.

DPCools avatar May 03 '23 14:05 DPCools

can confirm, the issue persists

CrazyWolf13 avatar May 06 '23 19:05 CrazyWolf13

can confirm, the issue still persists.

mian-muhammad avatar May 13 '23 09:05 mian-muhammad

Is Dashy unsupported ?

PuckeyP avatar Jun 10 '23 13:06 PuckeyP

If the files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytime the config files are edited)

ykelvis avatar Sep 12 '23 07:09 ykelvis

Nope does not work

PuckeyP avatar Sep 12 '23 08:09 PuckeyP

files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytim

When you say mounted correctly I have done very tutorial i can find and there's a lot and trayed every possible config, trust me I have wasted hours on this. show how about you wright your how to guide to help people insted of being not so helpful.

DPCools avatar Sep 12 '23 08:09 DPCools

files are mounted correctly, doing a "rebuild application" through UI should fix this. (do this manually everytim

When you say mounted correctly I have done very tutorial i can find and there's a lot and trayed every possible config, trust me I have wasted hours on this. show how about you wright your how to guide to help people insted of being not so helpful.

I just did a test, and it seemed to me "rebuild" is really the one thing fixed it. I'll post configs below so you could give it a test. Upon bring the container up, the "frontpage" button doestn't do anything. After "rebuild" through the web UI, and check the logs to make sure it is rebuilt, the "frontpage" button will work.

docker-compose.yml

  test:
    image: lissy93/dashy
    ports:
      - 8000:80
    volumes:
      - ./test/conf.yml:/app/public/conf.yml
      - ./test/www.yml:/app/public/www.yml
    restart: unless-stopped

conf.yml

appConfig:
  layout: vertical
  defaultOpeningMethod: sametab
  enableMultiTasking: true
  disableContextMenu: true
  iconSize: large
  theme: cherry-blossom
  language: en
  hideComponents:
    hideSearch: false
    hideSettings: false
    hideSplashScreen: true
    hideFooter: true
    hideHeading: false
    hideNav: false
  startingView: default
  statusCheck: true
  statusCheckInterval: 30
  faviconApi: allesedv
  colCount: 4
  routingMode: history
  widgetsAlwaysUseProxy: true
  webSearch:
    disableWebSearch: true
    searchEngine: duckduckgo
    openingMethod: newtab
    searchBangs: {}
  enableFontAwesome: true
  enableMaterialDesignIcons: false
  auth:
    enableGuestAccess: false
    users: []
    enableKeycloak: false
  showSplashScreen: false
  preventWriteToDisk: false
  preventLocalSave: false
  disableConfiguration: false
  disableConfigurationForNonAdmin: false
  allowConfigEdit: true
  enableServiceWorker: false
  disableUpdateChecks: true
  disableSmartSort: false
  enableErrorReporting: false
pageInfo:
  title: homelab
  description: ''
  navLinks: null
  footerText: ''
pages:
  - name: frontpage
    path: 'www.yml'

www.yml

---
# Page meta info, like heading, footer text and nav links
pageInfo:
  title: Hello, Alicia
  description: General browser startpage
  logo: https://i.ibb.co/71WyyzM/little-bot-3.png

# Optional app settings and configuration
appConfig:
  statusCheck: false
  theme: charry-blossom
  fontAwesomeKey: c94dc2b452
  customCss: '.clock p.time { font-size: 3rem !important; }'
  layout: vertical
  iconSize: small

# Main content - An array of sections, each containing an array of items
sections:
- name: Dev & Cloud
  icon: far fa-code
  items:
  - title: GitHub
    icon: favicon
    url: https://github.com/

ykelvis avatar Sep 12 '23 10:09 ykelvis

thanks for the information, i will give it a try but that is just a faf.

DPCools avatar Sep 13 '23 12:09 DPCools