diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 10d57bc3..e28eba36 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## :sparkles: 2.0.4 - Dynamic Config Loading [PR #528](https://github.com/Lissy93/dashy/pull/528) +- `conf.yml` is now loaded dynamically and the app now only needs a browser refresh on config change, not a full rebuild! + ## 🐛 2.0.3 - Bug Fixes [PR #488](https://github.com/Lissy93/dashy/pull/488) - Press enter to submit login form (Re: #483) - Allow disabling write to local storage and disk (Re: #485) diff --git a/Dockerfile b/Dockerfile index ebb6f41c..f2b0029f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,11 +39,15 @@ WORKDIR ${DIRECTORY} RUN apk add --no-cache tzdata tini # Copy built application from build phase -COPY --from=BUILD_IMAGE /app ./ +COPY --from=BUILD_IMAGE /app/dist/ public/ +COPY --from=BUILD_IMAGE /app/node_modules/ node_modules/ +COPY services/ services/ +COPY src/utils/ src/utils/ +COPY package.json yarn.lock server.js ./ # Finally, run start command to serve up the built application ENTRYPOINT [ "/sbin/tini", "--" ] -CMD [ "yarn", "build-and-start" ] +CMD [ "yarn", "start" ] # Expose the port EXPOSE ${PORT} diff --git a/package.json b/package.json index 5cdc68f1..ee320b40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Dashy", - "version": "2.0.3", + "version": "2.0.4", "license": "MIT", "main": "server", "author": "Alicia Sykes (https://aliciasykes.com)", diff --git a/server.js b/server.js index 4cef9e23..6b81e2b6 100644 --- a/server.js +++ b/server.js @@ -68,7 +68,7 @@ const method = (m, mw) => (req, res, next) => (req.method === m ? mw(req, res, n const app = express() // Serves up static files .use(express.static(path.join(__dirname, 'dist'))) - .use(express.static(path.join(__dirname, 'public'), { index: 'initialization.html' })) + .use(express.static(path.join(__dirname, 'public'))) // Load middlewares for parsing JSON, and supporting HTML5 history routing .use(express.json({ limit: '1mb' })) .use(history()) diff --git a/services/print-message.js b/services/print-message.js index a1017d8c..69feb4de 100644 --- a/services/print-message.js +++ b/services/print-message.js @@ -28,9 +28,6 @@ module.exports = (ip, port, isDocker) => { + `${chars.CYAN}Welcome to Dashy! 🚀${chars.RESET}${chars.BR}` + `${chars.GREEN}Your new dashboard is now up and running ` + `${containerId ? `in container ID ${containerId}` : 'with Docker'}${chars.BR}` - + `${chars.GREEN}After updating your config file, run ` - + `'${chars.BRIGHT}docker exec -it ${containerId || '[container-id]'} yarn build` - + `${chars.RESET}${chars.GREEN}' to rebuild${chars.BR}` + `${chars.BLUE}${stars(91)}${chars.BR}${chars.RESET}`; } else { // Prepare message for users running app on bare metal @@ -38,8 +35,6 @@ module.exports = (ip, port, isDocker) => { + `┃ ${chars.CYAN}Welcome to Dashy! 🚀${blanks(55)}${chars.GREEN}┃${chars.BR}` + `┃ ${chars.CYAN}Your new dashboard is now up and running at ${chars.BRIGHT}` + `http://${ip}:${port}${chars.RESET}${blanks(18 - ip.length)}${chars.GREEN}┃${chars.BR}` - + `┃ ${chars.CYAN}After updating your config file, run '${chars.BRIGHT}yarn build` - + `${chars.RESET}${chars.CYAN}' to rebuild the app${blanks(6)}${chars.GREEN}┃${chars.BR}` + `┗${line(75)}┛${chars.BR}${chars.BR}${chars.RESET}`; } // Make some sexy ascii art ;) diff --git a/src/App.vue b/src/App.vue index d669556f..27984144 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,8 +3,8 @@
- -