Skip to content

Commit

Permalink
config: use ACCOUNTS_SESSION_REDIS_URL
Browse files Browse the repository at this point in the history
* Rename SESSION_REDIS as ACCOUNTS_SESSION_REDIS_URL.
* Remove unused "APP_SESSION_TYPE=redis" from docker-compose.yml.
  • Loading branch information
GraemeWatt committed Sep 10, 2024
1 parent ce67119 commit 6ca863a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ services:
- "APP_CELERY_RESULT_BACKEND=redis://cache:6379/2"
- "APP_OPENSEARCH_HOST=os:9200"
- "APP_SECRET_KEY=CHANGE_ME"
- "APP_SESSION_TYPE=redis"
- "APP_SESSION_REDIS_URL=redis://cache:6379/1"
- "APP_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1"
- "APP_SQLALCHEMY_DATABASE_URI=postgresql://hepdata:hepdata@db/hepdata"
- "SAUCE_USERNAME=${SAUCE_USERNAME}"
- "SAUCE_ACCESS_KEY=${SAUCE_ACCESS_KEY}"
Expand All @@ -38,8 +37,7 @@ services:
- "APP_CELERY_RESULT_BACKEND=redis://cache:6379/2"
- "APP_OPENSEARCH_HOST=os:9200"
- "APP_SECRET_KEY=CHANGE_ME"
- "APP_SESSION_TYPE=redis"
- "APP_SESSION_REDIS_URL=redis://cache:6379/1"
- "APP_ACCOUNTS_SESSION_REDIS_URL=redis://cache:6379/1"
- "APP_SQLALCHEMY_DATABASE_URI=postgresql://hepdata:hepdata@db/hepdata"
read_only: false
volumes:
Expand Down
2 changes: 1 addition & 1 deletion hepdata/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def _(x):
CACHE_TYPE = "redis"

# Session
SESSION_REDIS = "redis://localhost:6379/0"
ACCOUNTS_SESSION_REDIS_URL = CACHE_REDIS_URL
PERMANENT_SESSION_LIFETIME = timedelta(hours=12)

# OpenSearch
Expand Down
2 changes: 1 addition & 1 deletion hepdata/config_local.docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
CELERY_BROKER_URL = "redis://cache:6379/0"
CELERY_RESULT_BACKEND = "redis://cache:6379/1"
CACHE_REDIS_URL = "redis://cache:6379/0"
SESSION_REDIS = "redis://cache:6379/0"
ACCOUNTS_SESSION_REDIS_URL = CACHE_REDIS_URL
TEST_DB_HOST = "db"
OPENSEARCH_HOST = "os"
SEARCH_HOSTS = [
Expand Down

0 comments on commit 6ca863a

Please sign in to comment.