@@ -117,9 +117,8 @@ git clone https://github.com/igormagalhaesr/FastAPI-boilerplate
117117```
118118
119119### 3.1 Environment Variables (.env)
120- And create a ".env" file:
121120
122- Then create a ` .env ` file:
121+ Then create a ` .env ` file inside ` src ` directory :
123122``` sh
124123touch .env
125124```
@@ -140,8 +139,8 @@ For the database ([`if you don't have a database yet, click here`]()), create:
140139# ------------- database -------------
141140POSTGRES_USER="your_postgres_user"
142141POSTGRES_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"
145144POSTGRES_DB="your_db"
146145```
147146
@@ -170,23 +169,22 @@ ADMIN_PASSWORD="your_password"
170169
171170For redis caching:
172171```
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"
176175```
177176
178177And for client-side caching:
179178```
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"
183181```
184182
185183For ARQ Job Queues:
186184```
187185# ------------- 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"
190188```
191189> [ !WARNING]
192190> 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"
200198For the rate limiter:
201199```
202200# ------------- 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"
205203
206204
207205# ------------- default rate limit settings -------------
0 commit comments