Skip to content

Commit

Permalink
fix db and cache config issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jsatt committed Jan 26, 2021
1 parent f6f7712 commit 3e76bf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions base_app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
# Databases
DATABASES = {
'default': env.db_opts('DATABASE_URL', default="sqlite://:memory:", options={
'USER': env.str('DATABASE_USER', default='postgres'),
'PASSWORD': env.str('DATABASE_PASSWORD', default='postgres'), # needed in case password has non-URL safe chars
'CONN_MAX_AGE': env.int('DATABASE_CONNECTION_AGE', default=600),
}),
}
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ x-common: &app-common
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
CACHE_URL: redis://cache:6379/0
CELERY_BROKER_URL: redis://cache:6379/1
CELERY_RESULT_BACKEND: redis://cache:6379/2
SESSION_CACHE_URL: redis://cache:6379/1
CELERY_BROKER_URL: redis://cache:6379/2
CELERY_RESULT_BACKEND: redis://cache:6379/3
user: ${UID:-app_user}
volumes:
- ${COMPOSE_APP_PATH:-.}:/usr/src/app:delegated
Expand Down

0 comments on commit 3e76bf8

Please sign in to comment.