Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Docker rebuilds the app every time the container is restarted #877

Closed
5 tasks done
GGORG0 opened this issue Aug 30, 2022 · 14 comments
Closed
5 tasks done

[BUG] Docker rebuilds the app every time the container is restarted #877

GGORG0 opened this issue Aug 30, 2022 · 14 comments
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working

Comments

@GGORG0
Copy link

GGORG0 commented Aug 30, 2022

Environment

Self-Hosted (Docker)

System

Raspberry Pi OS Bullseye; Docker-ce 20.10.17

Version

2.1.1

Describe the problem

Every time I start the docker container, the app rebuilds itself. I'm unable to access the interface, because my host (Raspberry Pi 4 2GB) is not powerful enough and the system crashes every time. Docker containers should build the app at image build time (in the Dockerfile, before it is published to the registry) or at least cache the build. That makes container startup instant every single time.
I'm suprised no one reported this before.

Additional info

image
(I normally run with compose, but here i ran it in interactive mode to show the output)

Please tick the boxes

@GGORG0 GGORG0 added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label Aug 30, 2022
@liss-bot
Copy link
Collaborator

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

@chevdor
Copy link

chevdor commented Aug 30, 2022

#799 is becoming very popular :)

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Aug 30, 2022
@GGORG0
Copy link
Author

GGORG0 commented Aug 30, 2022

Also, the subtitle needs to be changed, because it's kinda funny how it says "Your new dashboard is now up and running" before it acually rebuilds the app, which can take a long time depending on the host.

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Aug 31, 2022
@sur1v
Copy link
Contributor

sur1v commented Sep 7, 2022

Hello, I love the app thanks a lot @Lissy93 for sharing it <3

I found this problem too but for me was related with the amount resources that the container was using in the current release (about ~500Mb RAM), that for a dashboard is quite a bit, actually is the most RAM hungry container in my lab.

After checking the Dockerfile I noticed that the final run-time command for the container is yarn build-and-start with is a parallel run of node server and vue-cli-service build --watch --mode production. This parameter will make the build process keep watching the folder waiting to rebuild the app on any change. I guess this is related with 2 needs, developing or the app itself need to rebuild to show some changes.

I just created a PR with a Dockerfile that just init the container with yarn start, using effectively only 60 Mb of RAM, with no rebuilds. I restored my dashboard with ID and then created new items and everything seems to be working as it should.

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 7, 2022
@sur1v
Copy link
Contributor

sur1v commented Sep 11, 2022

PR has been merged so should be solved next release, meanwhile you can build your own image from Dockerfile at master

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Sep 12, 2022
@liss-bot
Copy link
Collaborator

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 liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Oct 13, 2022
@coalwater
Copy link

coalwater commented Oct 13, 2022

I was wondering the same thing, I experimented for a while with doing just yarn start instead of yarn build-and-start and while the app works, but a lot of features are broke, like multi page support and hash url routing, took me months to figure out this issue, at some point I even started looking for other dashboards because I started to feel the code was broken and there's not enough support on this one.
I created a question about this a week ago here #932 but since this is here I'm gonna link them together and close my issue.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed ⚰️ Stale [ISSUE] [PR] No activity for over 1 month 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Oct 13, 2022
@liss-bot
Copy link
Collaborator

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 liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Nov 14, 2022
@liss-bot
Copy link
Collaborator

This issue was automatically closed because it has been stalled for over 6 weeks with no activity.

@CrazyWolf13
Copy link
Collaborator

CrazyWolf13 commented Mar 3, 2024

t some point I even started looking for other dashboards because I started to feel the code was broken and there's not enough support on this one.
I created a question about this a we

Using yarn start instead of yarn build-and-start takes more ressources but essetinally yarn start does not rebuild on changes so it created a lot of problems and unhappy users.

Reverted this.

@CrazyWolf13
Copy link
Collaborator

I was wondering the same thing, I experimented for a while with doing just yarn start instead of yarn build-and-start and while the app works, but a lot of features are broke, like multi page support and hash url routing, took me months to figure out this issue, at some point I even started looking for other dashboards because I started to feel the code was broken and there's not enough support on this one. I created a question about this a week ago here #932 but since this is here I'm gonna link them together and close my issue.

Hi, yes you are right!
This problems seems to be related to dashy not automatically rebuilding on changes, see #1479 and #1290 (comment)
A new release has just been published, which should fix this issue, so please upgrade to the latest version.
If this is not the case just respond back to this ticket and I'll reopen this issue.
Thanks and have a nice day.

@github-project-automation github-project-automation bot moved this from Awaiting Triage to Done in Dashy V3 Mar 3, 2024
@CrazyWolf13
Copy link
Collaborator

@GGORG0 FYI in the next major version an overhaul to dashy, we will remove the need to rebuild the application for every change, then the docker container does not have to rebuild on every start.

If it really bothers you I recommand changing the start command in the container settings to yarn start instead of yarn build-and-start, this can be done the easiest with portainer(web gui to docker) then edit the container and redeploy

@breeegz
Copy link

breeegz commented Apr 9, 2024

I think was caught up this is issue. My main instance of Dashy died, and I was trying to spin up a backup to get me by until I could get my main instance back up. I don't think that I need support, I'm just putting this out there in case it helps someone else with trouble getting Dashy to run.

New Docker versions: Docker version 26.0.0, build 2ae903e
New Docker Compose V2 version: Docker Compose version v2.25.0
Dashy is updated Using Dashy V-2.1.2. Update Check Complete

Each time it started the Config File check passed.

Dashy  | Checking config file against schema...
Dashy  | ✔️ Config file is valid, no issues found

I'm trying to get it it running again, using the suggestions from the various threads, such as GUI Build, yarn start etc. I have two servers running, and I can't get Dashy to load on either. Fails the same way on each server.

Documentation suggests that I need to map a volume for the conf.yml and I have my formerly working instance loaded from a export, but it put a folder where a file needed to be, so I modified it from /root/my-local-conf.yml:/app/public/conf.yml to /root/folder/path/:/app/public/

I confirmed read/write access from inside the containers and outside the containers.

Restore from Cloudbackup worked - temporarily.. but restarting the container wasn't persistent, and even reloading the webpage wouldn't save the config. I tried save locally, it did not help make the config anymore persistent.

Last thing I did was check the formatting of the conf.yml

The one I was having trouble with was formatted like this (JSON?):

{
  "appConfig": {
    "theme": "nord-frost",
    "layout": "horizontal",
    "iconSize": "large",
    "language": "en"
  },
  "pageInfo": {
    "title": "Dashy for Breeegz",
    "description": "Dashboard V0.8",
    "navLinks": [
      {
        "title": "GitHub",
        "path": "https://github.com/Lissy93/dashy",
        "target": "newtab"
      },

and if I changed it to this style which I harvested from the cloud backup (Step 1: restore backup, Step 2:download file)

appConfig:
  theme: nord-frost
  layout: horizontal
  iconSize: large
  language: en
pageInfo:
  title: Dashy for Breeegz
  description: Dashboard V0.8
  navLinks:
    - title: GitHub
      path: https://github.com/Lissy93/dashy
      target: newtab
    - title: Documentation
      path: https://dashy.to/docs
      target: newtab
  footerText: ''
sections:
  - name: Getting Started
    icon: ''
    items:
      - &ref_0
        title: Dashy Live
        description: Development a project management links for Dashy
        icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
        url: https://live.dashy.to/
        target: newtab
        id: 0_1481_dashylive
      - &ref_1
        title: GitHub
        description: Source Code, Issues and Pull Requests
        url: https://github.com/lissy93/dashy
        icon: favicon
        id: 1_1481_github
      - &ref_2
        title: Docs
        description: Configuring & Usage Documentation
        provider: Dashy.to
        icon: far fa-book
        url: https://dashy.to/docs
        id: 2_1481_docs
      - &ref_3
        title: Showcase
        description: See how others are using Dashy
        url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
        icon: far fa-grin-hearts
        id: 3_1481_showcase
      - &ref_4
        title: Config Guide
        description: See full list of configuration options
        url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
        icon: fas fa-wrench
        id: 4_1481_configguide
      - &ref_5
        title: Support
        description: Get help with Dashy, raise a bug, or get in contact
        url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
        icon: far fa-hands-helping
        id: 5_1481_support

Did this file format change between 2.1.1 and 2.1.2? By using the correct format for conf.yml, Dashy runs, sees the config, and is persistent.

@Lissy93
Copy link
Owner

Lissy93 commented Apr 10, 2024

Hey @breeegz,
Sorry for the issues, and thank you for your patience.
There haven't been any schema changes, and your config looks all correct to me (except I'm not sure what - &ref_2 at the start of each item is, I've not seen that before - looks like some weird encoding from your OS?).

There's an update coming very soon (likely this Sunday) in #1528 which will fix that. Since it will remove the need for Dashy to ever rebuild between config changes, and instead fetch the latest conf dynamically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working
Projects
Status: Done
Development

No branches or pull requests

8 participants