c. Docker Compose
Two new services β prometheus and grafana β must be added to compose.yaml. Both services share the same private Docker network as the microservices, so Prometheus can reach them by hostname.
The $SETUP variable points to the directory containing all external configuration files. Define it in the .env file at the root of the project:
The resulting project structure looks like this:
π api/
βββ π setup/
β βββ π prometheus/
β β βββ prometheus.yml
β βββ π grafana/
β βββ π provisioning/
β βββ π datasources/
β βββ datasources.yml
βββ π account-service/
βββ π auth-service/
βββ π gateway-service/
βββ compose.yaml
βββ .env