Skip to content

Commit 7918cd5

Browse files
authored
chore: updated config files (#90)
1 parent 1c9916d commit 7918cd5

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

.env

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,40 @@
1-
# service
1+
# Configuration for the Axum REST API Sample.
2+
3+
# Service configuration.
4+
# The hostname or IP address where the service is running.
25
SERVICE_HOST = 127.0.0.1
6+
# The port number on which the service listens.
37
SERVICE_PORT = 8080
48

5-
# redis
9+
# Redis configuration.
10+
# The hostname or IP address of the Redis server.
611
REDIS_HOST = 127.0.0.1
12+
# The port number on which the Redis server listens.
713
REDIS_PORT = 6379
814

9-
# postgres
15+
# PostgreSQL configuration.
16+
# The username for connecting to the PostgreSQL database.
1017
POSTGRES_USER = admin
18+
# The password for connecting to the PostgreSQL database.
1119
POSTGRES_PASSWORD = pswd1234
20+
# The hostname or IP address of the PostgreSQL server.
1221
POSTGRES_HOST = 127.0.0.1
22+
# The port number on which the PostgreSQL server listens.
1323
POSTGRES_PORT = 5432
24+
# The name of the PostgreSQL database.
1425
POSTGRES_DB = axum_web
26+
# The number of connections in the PostgreSQL connection pool.
1527
POSTGRES_CONNECTION_POOL = 5
1628

29+
# JWT (JSON Web Token) configuration.
30+
# The secret key used for signing JWTs.
1731
JWT_SECRET = h3EX6ZaWGrR9uwd8MkzbxA2yQmBPvCfn
32+
# The expiration time for access tokens in seconds.
1833
JWT_EXPIRE_ACCESS_TOKEN_SECONDS = 3600 # 1 hour
34+
# The expiration time for refresh tokens in seconds.
1935
JWT_EXPIRE_REFRESH_TOKEN_SECONDS = 7776000 # 90 days
36+
# The leeway time in seconds for validating JWTs.
2037
JWT_VALIDATION_LEEWAY_SECONDS = 60 # 1 minute, default
21-
JWT_ENABLE_REVOKED_TOKENS = true # using revoked tokens
38+
# Enable or disable the use of revoked tokens.
39+
# Set to 'true' to allow revoked tokens, 'false' to disallow.
40+
JWT_ENABLE_REVOKED_TOKENS = true

.env_docker

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
# service
21
SERVICE_HOST = 0.0.0.0
32
SERVICE_PORT = 8080
43

5-
# redis
64
REDIS_HOST = redis
75
REDIS_PORT = 6379
86

9-
# postgres
107
POSTGRES_USER = admin
118
POSTGRES_PASSWORD = pswd1234
129
POSTGRES_HOST = postgres

.env_test

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
ENV_TEST = 1
22

3-
# service
43
SERVICE_HOST = 127.0.0.1
54
SERVICE_PORT = 8080
65

7-
# redis
86
REDIS_HOST = 127.0.0.1
97
REDIS_PORT = 6379
108

11-
# postgres
129
POSTGRES_USER = admin
1310
POSTGRES_PASSWORD = pswd1234
1411
POSTGRES_HOST = 127.0.0.1

.env_test_docker

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
ENV_TEST = 1
22
RUST_TEST_THREADS = 1
33

4-
# service
54
SERVICE_HOST = 127.0.0.1
65
SERVICE_PORT = 8080
76

8-
# redis
97
REDIS_HOST = redis
108
REDIS_PORT = 6379
119

12-
# postgres
1310
POSTGRES_USER = admin
1411
POSTGRES_PASSWORD = pswd1234
1512
POSTGRES_HOST = postgres

0 commit comments

Comments
 (0)