File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33# =============================================================================
44
55# Django
6+ DJANGO_JWT_ALGORITHM = HS256
67DJANGO_SECRET_KEY = dev-secret-key-change-in-production
78DJANGO_SETTINGS_MODULE = backend.settings.local
89
Original file line number Diff line number Diff line change 8282}
8383
8484SIMPLE_JWT = {
85+ "ALGORITHM" : getenv ("DJANGO_JWT_ALGORITHM" ),
8586 "ACCESS_TOKEN_LIFETIME" : timedelta (hours = 1 ),
8687 "REFRESH_TOKEN_LIFETIME" : timedelta (days = 7 ),
8788 "USER_AUTHENTICATION_RULE" : "backend.apps.chatbot.authentication.authentication_rule" ,
196197# GraphQL JWT configurations
197198GRAPHQL_JWT = {
198199 "JWT_AUTH_HEADER_PREFIX" : "Bearer" ,
200+ "JWT_ALGORITHM" : getenv ("DJANGO_JWT_ALGORITHM" ),
199201 "JWT_VERIFY_EXPIRATION" : True ,
200202 "JWT_EXPIRATION_DELTA" : timedelta (days = 7 ),
201203 "JWT_REFRESH_EXPIRATION_DELTA" : timedelta (days = 14 ),
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ services:
1313 memlock :
1414 soft : -1
1515 hard : -1
16- volumes : [esdata:/usr/share/elasticsearch/data]
1716 ports : [9200:9200, 9300:9300]
17+ volumes : [esdata:/usr/share/elasticsearch/data]
1818 healthcheck :
1919 test : [CMD-SHELL, curl -s http://localhost:9200 >/dev/null || exit 1]
2020 interval : 1m
@@ -37,6 +37,7 @@ services:
3737 env_file : [.env]
3838 ports : [5432:5432]
3939 volumes : [pgdata:/var/lib/postgresql/data]
40+ networks : [default, db_network]
4041 healthcheck :
4142 test : [CMD, pg_isready, -U, postgres]
4243 interval : 1m
@@ -59,10 +60,11 @@ services:
5960 memory : 4G
6061 env_file : [.env]
6162 command : [poetry, run, /app/start-server-dev.sh]
62- volumes : [.:/app, $HOME/.basedosdados/credentials:/app/credentials:ro]
6363 ports :
6464 - 8080:80 # API port
6565 - 5678:5678 # Debug port
66+ volumes : [.:/app, $HOME/.basedosdados/credentials:/app/credentials:ro]
67+ networks : [default, db_network]
6668 depends_on :
6769 index :
6870 condition : service_healthy
@@ -80,3 +82,7 @@ services:
8082volumes :
8183 esdata :
8284 pgdata :
85+ # External network used for database access by other services (e.g., chatbot API)
86+ networks :
87+ db_network :
88+ name : db_network
You can’t perform that action at this time.
0 commit comments