Skip to content

Commit

Permalink
allow change db/redis/typesense setup in .env
Browse files Browse the repository at this point in the history
  • Loading branch information
Her Email committed Nov 25, 2023
1 parent c110ab5 commit 84a02c3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions common/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def check(self):
errors.append(
Error(
f"Error while connecting to redis: {e}",
hint="Check NEODB_REDIS_URL in .env",
hint="Check NEODB_REDIS_URL/TAKAHE_CACHES_DEFAULT in .env",
id="neodb.E002",
)
)
Expand All @@ -195,8 +195,8 @@ def check(self):
except Exception as e:
errors.append(
Error(
f"Error while connecting to elasticsearch: {e}",
hint="Check ELASTICSEARCH_URL in .env",
f"Error while connecting to search index server: {e}",
hint='Check NEODB_SEARCH_URL in .env, and run "neodb-manage migration"',
id="neodb.E003",
)
)
Expand All @@ -213,8 +213,8 @@ def check(self):
except Exception as e:
errors.append(
Error(
f"Error while querying Takahe database: {e}",
hint="Check TAKAHE_DB_URL in .env",
f"Error while querying takahe database: {e}",
hint='Check TAKAHE_DB_URL/TAKAHE_DATABASE_SERVER in .env, and run "takahe-manage migration"',
id="neodb.E004",
)
)
Expand Down
12 changes: 6 additions & 6 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ x-shared:
NEODB_DISABLE_CRON:
NEODB_SENTRY_DSN:
TAKAHE_SENTRY_DSN:
NEODB_DB_URL: postgres://neodb:aubergine@neodb-db/neodb
TAKAHE_DB_URL: postgres://takahe:aubergine@takahe-db/takahe
NEODB_REDIS_URL: redis://redis:6379/0
NEODB_SEARCH_URL: typesense://user:eggplant@typesense:8108/catalog
NEODB_DB_URL: ${NEODB_DB_URL:-postgres://neodb:aubergine@neodb-db/neodb}
TAKAHE_DB_URL: ${TAKAHE_DB_URL:-postgres://takahe:aubergine@takahe-db/takahe}
NEODB_REDIS_URL: ${NEODB_REDIS_URL:-redis://redis:6379/0}
NEODB_SEARCH_URL: ${NEODB_SEARCH_URL:-typesense://user:eggplant@typesense:8108/catalog}
NEODB_EMAIL_URL:
NEODB_EMAIL_FROM: no-reply@${NEODB_SITE_DOMAIN}
NEODB_DOWNLOADER_PROXY_LIST:
Expand All @@ -48,8 +48,8 @@ x-shared:
TAKAHE_MAIN_DOMAIN: ${NEODB_SITE_DOMAIN}
TAKAHE_MEDIA_URL: https://${NEODB_SITE_DOMAIN}/media/
TAKAHE_EMAIL_FROM: no-reply@${NEODB_SITE_DOMAIN}
TAKAHE_DATABASE_SERVER: postgres://takahe:aubergine@takahe-db/takahe
TAKAHE_CACHES_DEFAULT: redis://redis:6379/0
TAKAHE_DATABASE_SERVER: ${TAKAHE_DATABASE_SERVER:-postgres://takahe:aubergine@takahe-db/takahe}
TAKAHE_CACHES_DEFAULT: ${TAKAHE_CACHES_DEFAULT:-redis://redis:6379/0}
TAKAHE_MEDIA_BACKEND: local://www/media/
TAKAHE_MEDIA_ROOT: /www/media
TAKAHE_USE_PROXY_HEADERS: true
Expand Down

0 comments on commit 84a02c3

Please sign in to comment.