Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated config files #90

Merged
merged 1 commit into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -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
# Enable or disable the use of revoked tokens.
# Set to 'true' to allow revoked tokens, 'false' to disallow.
JWT_ENABLE_REVOKED_TOKENS = true
3 changes: 0 additions & 3 deletions .env_docker
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions .env_test
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions .env_test_docker
Original file line number Diff line number Diff line change
@@ -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
Expand Down