From 729aa2170e1e461e131c29aa006f9ba32bf1abfd Mon Sep 17 00:00:00 2001 From: Paul Wagner Date: Wed, 8 Jan 2025 22:52:26 +0100 Subject: [PATCH] update default port to 10030 --- Dockerfile | 2 +- README.md | 8 ++++---- src/main.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6fa4b2f..5a229c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,7 @@ RUN set -eux \ FROM scratch # declare our metrics port -EXPOSE 8080 +EXPOSE 10030 # copy the raw binary into the new image COPY --from=builder "/usr/src/dcexport/target/release/dcexport" "/dcexport" diff --git a/README.md b/README.md index 699ae11..6da24c6 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ is configured using the cli or environment variables. |---------------|---------------|--------------------------------------------------------------------------------------------------------| | DISCORD_TOKEN | (required) | The token of the Discord bot that is on the guilds that should be exported. | | LOG_LEVEL | dcexport=info | The log filter configuration of the application. See [here][tracing-log-example] for more information. | -| ADDRESS | 0.0.0.0:8080 | The metrics server address. | +| ADDRESS | 0.0.0.0:10030 | The metrics server address. | #### From Binaries @@ -63,7 +63,7 @@ Those images are hardened and provide the optimal environment to execute dcexpor ```shell docker run --rm \ -e DISCORD_TOKEN= \ - -p 8080/tcp \ + -p 10030/tcp \ --name dcexport \ ghcr.io/scrayosnet/dcexport:latest ``` @@ -79,7 +79,7 @@ To verify whether everything works as expected, we can invoke the following comm reported result: ```shell -curl --request GET -sL --url 'http://localhost:8080/' +curl --request GET -sL --url 'http://localhost:10030/' ``` If the result shows any metrics, dcexport is now setup successfully and can be used to track Discord guilds. @@ -103,7 +103,7 @@ scrape_configs: scheme: http static_configs: - targets: - - dcexport:8080 + - dcexport:10030 ``` #### CRD-based Configuration diff --git a/src/main.rs b/src/main.rs index 5993c43..b740190 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ use tracing_subscriber::prelude::*; use tracing_subscriber::EnvFilter; /// The default address (port) of the application metrics server. -pub const DEFAULT_ADDRESS: &str = "0.0.0.0:8080"; +pub const DEFAULT_ADDRESS: &str = "0.0.0.0:10030"; /// The default log level of the application. pub const DEFAULT_LOG_LEVEL: &str = "dcexport=info";