FrontendService: Add support for swagger in the local dev env (#113937)

This commit is contained in:
Ezequiel Victorero
2025-11-17 09:00:11 -03:00
committed by GitHub
parent d10dc81a79
commit fe95e0a6db
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -13,9 +13,9 @@ On top of the main Grafana development dependencies, you will need installed:
- [Docker](https://docs.docker.com/get-started/get-docker/)
- [Tilt](https://docs.tilt.dev/install.html). At the moment we're not using Kubernetes locally, so you shouldn't need to follow the instructions to install kubectl or kind.
To start the stack, from the root of the Grafana project run `make frontend-service-up`. Tilt will orchestrate the webpack and docker builds, and then run the services with Docker compose. You can monitor it's progress and see logs with the URL to the Tilt console. Once done, you can access Grafana at `http://localhost:3000`.
To start the stack, from the root of the Grafana project run `make frontend-service`. Tilt will orchestrate the webpack and docker builds, and then run the services with Docker compose. You can monitor it's progress and see logs with the URL to the Tilt console. Once done, you can access Grafana at `http://localhost:3000`.
Quitting the process will not stop the service from running. Run `make frontend-service-down` when done to shut down the docker containers.
Quitting the process will stop the service from running.
### Grafana config
+1 -1
View File
@@ -73,7 +73,7 @@ server {
}
# API calls go to the backend
location ~ ^/(api|apis|avatar|bootdata|render|logout|public\/plugins|goto) {
location ~ ^/(api|apis|avatar|bootdata|render|logout|public/plugins|public/openapi3|public/api-merged|goto|swagger|openapi/v3) {
# Add debug headers to the response
add_header Nginx-Trace-Id $otel_trace_id always;
add_header Nginx-Route "backend" always;
@@ -31,6 +31,8 @@ services:
- ./provisioning/dashboards:/grafana/conf/provisioning/dashboards
- ../dev-dashboards:/grafana/conf/dev-dashboards
- ./configs/grafana-api.local.ini:/grafana/conf/custom.ini
- ../../public/openapi3.json:/grafana/public/openapi3.json
- ../../public/api-merged.json:/grafana/public/api-merged.json
environment:
OTEL_BSP_SCHEDULE_DELAY: 500
GF_DEFAULT_APP_MODE: development