@@ -117,9 +117,8 @@ git clone https://github.com/igormagalhaesr/FastAPI-boilerplate
117
117
```
118
118
119
119
### 3.1 Environment Variables (.env)
120
- And create a ".env" file:
121
120
122
- Then create a ` .env ` file:
121
+ Then create a ` .env ` file inside ` src ` directory :
123
122
``` sh
124
123
touch .env
125
124
```
@@ -140,8 +139,8 @@ For the database ([`if you don't have a database yet, click here`]()), create:
140
139
# ------------- database -------------
141
140
POSTGRES_USER="your_postgres_user"
142
141
POSTGRES_PASSWORD="your_password"
143
- POSTGRES_SERVER="your_server" # default localhost
144
- POSTGRES_PORT=5432
142
+ POSTGRES_SERVER="your_server" # default " localhost", if using docker compose you should use "db"
143
+ POSTGRES_PORT=5432 # default "5432", if using docker compose you should use "5432"
145
144
POSTGRES_DB="your_db"
146
145
```
147
146
@@ -170,23 +169,22 @@ ADMIN_PASSWORD="your_password"
170
169
171
170
For redis caching:
172
171
```
173
- # ------------- redis -------------
174
- REDIS_CACHE_HOST="your_host" # default "localhost", if using docker compose you should user "redis"
175
- REDIS_CACHE_PORT=6379
172
+ # ------------- redis cache -------------
173
+ REDIS_CACHE_HOST="your_host" # default "localhost", if using docker compose you should use "redis"
174
+ REDIS_CACHE_PORT=6379 # default "6379", if using docker compose you should use "6379"
176
175
```
177
176
178
177
And for client-side caching:
179
178
```
180
- # ------------- redis cache -------------
181
- REDIS_CACHE_HOST="your_host" # default "localhost", if using docker compose you should user "redis"
182
- REDIS_CACHE_PORT=6379
179
+ # ------------- redis client-side cache -------------
180
+ CLIENT_CACHE_MAX_AGE=30 # default "30"
183
181
```
184
182
185
183
For ARQ Job Queues:
186
184
```
187
185
# ------------- redis queue -------------
188
- REDIS_CACHE_HOST ="your_host" # default "localhost", if using docker compose you should use "db "
189
- REDIS_CACHE_PORT =6379
186
+ REDIS_QUEUE_HOST ="your_host" # default "localhost", if using docker compose you should use "redis "
187
+ REDIS_QUEUE_PORT =6379 # default "6379", if using docker compose you should use "6379"
190
188
```
191
189
> [ !WARNING]
192
190
> You may use the same redis for both caching and queue while developing, but the recommendation is using two separate containers for production.
@@ -200,8 +198,8 @@ TIER_NAME="free"
200
198
For the rate limiter:
201
199
```
202
200
# ------------- redis rate limit -------------
203
- REDIS_RATE_LIMIT_HOST="localhost" # default="localhost"
204
- REDIS_RATE_LIMIT_PORT=6379 # default=6379
201
+ REDIS_RATE_LIMIT_HOST="localhost" # default="localhost", if using docker compose you should use "redis"
202
+ REDIS_RATE_LIMIT_PORT=6379 # default=6379, if using docker compose you should use "6379"
205
203
206
204
207
205
# ------------- default rate limit settings -------------
0 commit comments