From 5eb7352738668bc3625bafbf00f86917d9d47d86 Mon Sep 17 00:00:00 2001 From: Sheroz Date: Sun, 16 Feb 2025 21:05:59 +0300 Subject: [PATCH] chore: updated config files --- .env | 27 +++++++++++++++++++++++---- .env_docker | 3 --- .env_test | 3 --- .env_test_docker | 3 --- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.env b/.env index c6ac299..a1a0a19 100644 --- a/.env +++ b/.env @@ -1,21 +1,40 @@ -# service +# Configuration for the Axum REST API Sample. + +# Service configuration. +# The hostname or IP address where the service is running. SERVICE_HOST = 127.0.0.1 +# The port number on which the service listens. SERVICE_PORT = 8080 -# redis +# Redis configuration. +# The hostname or IP address of the Redis server. REDIS_HOST = 127.0.0.1 +# The port number on which the Redis server listens. REDIS_PORT = 6379 -# postgres +# PostgreSQL configuration. +# The username for connecting to the PostgreSQL database. POSTGRES_USER = admin +# The password for connecting to the PostgreSQL database. POSTGRES_PASSWORD = pswd1234 +# The hostname or IP address of the PostgreSQL server. POSTGRES_HOST = 127.0.0.1 +# The port number on which the PostgreSQL server listens. POSTGRES_PORT = 5432 +# The name of the PostgreSQL database. POSTGRES_DB = axum_web +# The number of connections in the PostgreSQL connection pool. POSTGRES_CONNECTION_POOL = 5 +# JWT (JSON Web Token) configuration. +# The secret key used for signing JWTs. JWT_SECRET = h3EX6ZaWGrR9uwd8MkzbxA2yQmBPvCfn +# The expiration time for access tokens in seconds. JWT_EXPIRE_ACCESS_TOKEN_SECONDS = 3600 # 1 hour +# The expiration time for refresh tokens in seconds. JWT_EXPIRE_REFRESH_TOKEN_SECONDS = 7776000 # 90 days +# The leeway time in seconds for validating JWTs. JWT_VALIDATION_LEEWAY_SECONDS = 60 # 1 minute, default -JWT_ENABLE_REVOKED_TOKENS = true # using revoked tokens \ No newline at end of file +# Enable or disable the use of revoked tokens. +# Set to 'true' to allow revoked tokens, 'false' to disallow. +JWT_ENABLE_REVOKED_TOKENS = true diff --git a/.env_docker b/.env_docker index f7c34ec..61cb7ab 100644 --- a/.env_docker +++ b/.env_docker @@ -1,12 +1,9 @@ -# service SERVICE_HOST = 0.0.0.0 SERVICE_PORT = 8080 -# redis REDIS_HOST = redis REDIS_PORT = 6379 -# postgres POSTGRES_USER = admin POSTGRES_PASSWORD = pswd1234 POSTGRES_HOST = postgres diff --git a/.env_test b/.env_test index 796155f..90ef98c 100644 --- a/.env_test +++ b/.env_test @@ -1,14 +1,11 @@ ENV_TEST = 1 -# service SERVICE_HOST = 127.0.0.1 SERVICE_PORT = 8080 -# redis REDIS_HOST = 127.0.0.1 REDIS_PORT = 6379 -# postgres POSTGRES_USER = admin POSTGRES_PASSWORD = pswd1234 POSTGRES_HOST = 127.0.0.1 diff --git a/.env_test_docker b/.env_test_docker index d71d5d8..cb8c3d5 100644 --- a/.env_test_docker +++ b/.env_test_docker @@ -1,15 +1,12 @@ ENV_TEST = 1 RUST_TEST_THREADS = 1 -# service SERVICE_HOST = 127.0.0.1 SERVICE_PORT = 8080 -# redis REDIS_HOST = redis REDIS_PORT = 6379 -# postgres POSTGRES_USER = admin POSTGRES_PASSWORD = pswd1234 POSTGRES_HOST = postgres