Last active
February 2, 2022 14:36
-
-
Save jackw/9c7f4388ecbe45c0d5b71d08ca4f1e36 to your computer and use it in GitHub Desktop.
Grafana Docker plugin development with grafana/toolkit and live reload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
grafana: | |
container_name: grafana-basic-panel | |
build: . | |
ports: | |
- 3000:3000/tcp | |
volumes: | |
- ./dist:/var/lib/grafana/plugins/basic-panel | |
- ./provisioning:/etc/grafana/provisioning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM grafana/grafana:latest | |
ENV GF_AUTH_ANONYMOUS_ORG_ROLE "Admin" | |
ENV GF_AUTH_ANONYMOUS_ENABLED "true" | |
ENV GF_AUTH_BASIC_ENABLED "false" | |
ENV GF_ENABLE_GZIP "true" | |
ENV GF_DEFAULT_APP_MODE "development" | |
ENV GF_INSTALL_PLUGINS "marcusolsson-static-datasource" | |
USER root | |
RUN sed -i 's/<\/body><\/html>/<script src=\"http:\/\/localhost:35729\/livereload.js\"><\/script><\/body><\/html>/g' /usr/share/grafana/public/views/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const LiveReloadPlugin = require("webpack-livereload-plugin"); | |
module.exports.getWebpackConfig = (config, options) => ({ | |
...config, | |
plugins: [...config.plugins, new LiveReloadPlugin()], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment