dashy icon indicating copy to clipboard operation
dashy copied to clipboard

[BUG] No longer builds on startup

Open rtm516 opened this issue 2 years ago • 14 comments

Environment

Self-Hosted (Docker)

System

Chrome 108 on Windows 10 - Docker 20.10.17 on Raspbian 11 bullseye

Version

2.1.1

Describe the problem

For a few versions now Dashy starts up and doesn't have my custom styles applied so I need to connect and run yarn build manually. I have a file mounted at /app/src/styles/user-defined-themes.scss to apply my custom scss which used to work fine after updates, but now I need to trigger a manual build every container update. My containers are automatically update using watchtowerr

Additional info

The below is the output of the container on start

yarn run v1.22.15
$ node server
Checking config file against schema...
✔️ Config file is valid, no issues found
 ██████╗  █████╗ ███████╗██╗  ██╗██╗   ██╗
 ██╔══██╗██╔══██╗██╔════╝██║  ██║╚██╗ ██╔╝
 ██║  ██║███████║███████╗███████║ ╚████╔╝
 ██║  ██║██╔══██║╚════██║██╔══██║  ╚██╔╝
 ██████╔╝██║  ██║███████║██║  ██║   ██║
 ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝   ╚═╝
*******************************************************************************************
Welcome to Dashy! 🚀
Your new dashboard is now up and running with Docker
*******************************************************************************************
🔐 HTTPS server successfully started (port: 443 of container)
Using Dashy V-2.1.1. Update Check Complete
✅ Dashy is Up-to-Date

Please tick the boxes

rtm516 avatar Jan 09 '23 16:01 rtm516

I confirm this problem. You have to manually enter the container and run the yarn build command. Only then does Dashy rebuild and themes and configurations are applied. Multipages also don't work until you manually rebuild Dashy.

vovinski avatar Jan 17 '23 06:01 vovinski

You may solve this by adding entrypoint: ["yarn","build-and-start"] to your docker-compose.yml. The drawback is whenever you click the "save on disk" button, it will build the whole project again. It can be CPU-consuming for some low-end VM. Hope there will be a more elegant way to solve this problem.

here is my docker-compose.yml version: "3.8"

services: dashy: container_name: Dashy hostname: dashy # Pull latest image from DockerHub image: lissy93/dashy:latest

# Pass in your config file below, by specifying the path on your host machine
volumes:
  - /home/ubuntu/dashy/public:/app/public
  - type: bind
    source: /home/ubuntu/dashy/.env
    target: /app/public/.env
entrypoint: ["yarn","build-and-start"]

# Set port that web service will be served on. Keep container port as 80
ports:
  - 4000:80

# Set any environmental variables
environment:
  - NODE_ENV=production

# Specify restart policy
restart: unless-stopped

# Configure healthchecks
healthcheck:
  test: ['CMD', 'node', '/app/services/healthcheck']
  interval: 1m30s
  timeout: 10s
  retries: 3
  start_period: 40s

If I have time this weekend, I will write articles on how to build Dashy using docker & how to use Nginx Proxy Manager + Authelia for authentication.

Btw the solution to this issue was mentioned by coalwater. You may read the closed issue here.

silicon2022 avatar Jan 18 '23 12:01 silicon2022

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 Feb 19 '23 01:02 liss-bot

This is still relevant and happens without changing entrypoint to yarn build-and-start

rtm516 avatar Feb 22 '23 08:02 rtm516

We will not wait for the developer's response, it seems. Is she too busy with other projects?

vovinski avatar Mar 03 '23 09:03 vovinski

I confirm this problem. You have to manually enter the container and run the yarn build command. Only then does Dashy rebuild and themes and configurations are applied. Multipages also don't work until you manually rebuild Dashy.

Can confirm this still happens to me, after I added multiple pages.

Used the UI to make edits, save, refresh, and the edit is gone. Can confirm the config file is saved locally. I have to manually trigger the rebuild from the UI.

It still builds if I restart my docker, but having to restart or trigger manually each time I make edits via UI is annoying.

iveney avatar Mar 07 '23 00:03 iveney

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 Apr 07 '23 01:04 liss-bot

This is still relevant

rtm516 avatar Apr 10 '23 13:04 rtm516

I can confirm this is still relevant too.

Interestingly, this is a regression from 2.1.0.

Took a lot of head-scratching to understand why my Keycloak authentication configuration was not applying properly. It was caused because no build happens when the official Docker image is started.

In my opinion this issue becomes far more severe if my dashboard can become public-access if my Docker container gets recreated (without manually intervening and starting a build).

itsmejoeeey avatar Apr 20 '23 14:04 itsmejoeeey

Further investigations:

I've narrowed down that this regressed in commit " 60d0b03: removed build watch and tini from container run-time". It was pushed directly to master, so there is no linked PR or issue with more information about this change.

This change isn't in the 2.1.1 tag, so this shouldn't be an issue in the 2.1.1 docker image. BUT. I've noticed that the 2.1.1 Docker image was last updated 13 days ago and when viewing the Image Layer Details it seems to be executing commands as if using the master Dockerfile.

@Lissy93 Are you aware of an issue with the automated deployments deploying some form of master to the 2.1.1 tag on Docker Hub?

itsmejoeeey avatar Apr 21 '23 07:04 itsmejoeeey

This issue has gone 3 months 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 Jul 21 '23 01:07 liss-bot

Still relevant. Waiting to hear back from @Lissy93.

itsmejoeeey avatar Jul 22 '23 22:07 itsmejoeeey

This issue has gone 3 months 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 Oct 27 '23 01:10 liss-bot

Still relevant. Waiting to hear back from @Lissy93.

itsmejoeeey avatar Oct 27 '23 01:10 itsmejoeeey

The fix for this issue has now been released in 2.1.2 ✨

If you haven't done so already, please update your instance to 2.1.2 or later. See 2.1.2 for full info.

Feel free to reach out if you need any more support. If you are enjoying Dashy, consider supporting the project.

liss-bot avatar Mar 03 '24 15:03 liss-bot