1
0
mirror of https://github.com/chylex/Apache-Prometheus-Exporter.git synced 2025-04-20 22:15:46 +02:00

Expose metrics web server port in Docker Compose example

This commit is contained in:
chylex 2023-09-30 22:20:03 +02:00
parent 8e7259b906
commit ce6f345b6a
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
2 changed files with 4 additions and 4 deletions

View File

@ -12,9 +12,9 @@ This configuration will create a Docker volume for the logs, and the following c
- **User** : `admin`
- **Password** : `admin`
3. **Prometheus** configured with the exporter's endpoint.
4. **Exporter** built using the source code from this repository.
4. **Exporter** built using the source code from this repository, with its metrics endpoint exposed as: http://localhost:2004/metrics
This example is not suitable for production. You can use it as inspiration, but you will have to modify it in order to persist container data and follow the latest security practices:
This example is unsuitable for production. You can use it as inspiration, but you will have to modify it in order to persist container data and follow the latest security practices:
- Create Docker volumes for persistent storage of container data and configuration files
- Create a dedicated user for each container instead of running as `root`

View File

@ -38,8 +38,8 @@ services:
exporter:
container_name: ape_dev_exporter
build: "../"
expose:
- "9240"
ports:
- "127.0.0.1:2004:9240"
volumes:
- logs:/logs
environment: