--- title: grafana-template categories: - Web and infrastructure --- **grafana-template** is a pre-configured Docker observability stack: Grafana with data sources already provisioned for a MySQL database and a static file server. ## Services `docker-compose up -d` starts: - **Grafana** at `http://localhost:3000` (admin/admin). - **MySQL 8.0** for application data. - **A CSV server** (Busybox) serving `./csv_data`. ## Data sources The data sources are provisioned automatically: - **mysql** is connected to the `grafana_db` database; tables come from `init.sql`. - **infinity-csv** reads files from the CSV server. In a panel, set the source to *URL* and use `http://csv/`. Grafana resolves `csv` inside the Docker network. ## Customization - `init.sql`: `CREATE TABLE` and `INSERT` statements, run when the volume is first created. Data persists in the `mysql_data` volume. - `csv_data/`: drop `.csv`, `.json` or `.xml` files here; they are available immediately. > [!TIP] > If the containers hit permission errors on local volumes, run > `./fix-perms.sh`. ## See also - [Source code](https://github.com/hugoocoto/grafana-template) (MIT)