Skip to content

Commit

Permalink
Update default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon committed May 28, 2024
1 parent a7c6e31 commit f20189c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions datalab/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def get_list_from_env(variable, default=None):
WSGI_APPLICATION = 'datalab.wsgi.application'

DRAMATIQ_BROKER = {
'BROKER': 'dramatiq.brokers.rabbitmq.RabbitmqBroker',
'BROKER': os.getenv('DRAMATIQ_BROKER', 'dramatiq.brokers.redis.RedisBroker'),
'OPTIONS': {
'url': os.getenv('DRAMATIQ_BROKER', 'amqp://localhost:5672'),
'url': os.getenv('DRAMATIQ_BROKER_URL', 'redis://127.0.0.1:6379'),
},
'MIDDLEWARE': [
'dramatiq.middleware.Prometheus',
Expand All @@ -117,9 +117,9 @@ def get_list_from_env(variable, default=None):
}

DRAMATIQ_RESULT_BACKEND = {
'BACKEND': 'dramatiq.results.backends.redis.RedisBackend',
'BACKEND': os.getenv('DRAMATIQ_RESULT_BACKEND', 'dramatiq.results.backends.redis.RedisBackend'),
'BACKEND_OPTIONS': {
'url': os.getenv('DRAMATIQ_RESULT_BACKEND', 'redis://localhost:6379'),
'url': os.getenv('DRAMATIQ_RESULT_BACKEND_URL', 'redis://localhost:6379'),
},
'MIDDLEWARE_OPTIONS': {
'result_ttl': 1000 * 60 * 10
Expand All @@ -131,7 +131,7 @@ def get_list_from_env(variable, default=None):
DRAMATIQ_TASKS_DATABASE = 'default'

# AWS S3 Bitbucket
DATALAB_OPERATION_BUCKET = os.getenv('DATALAB_OPERATION_BUCKET', 'datalab-operation-output-bucket')
DATALAB_OPERATION_BUCKET = os.getenv('DATALAB_OPERATION_BUCKET', 'datalab-operation-output-lco-global')

# Datalab Archive
ARCHIVE_API = os.getenv('ARCHIVE_API', 'https://archive-api.lco.global')
Expand All @@ -153,8 +153,8 @@ def get_list_from_env(variable, default=None):

CACHES = {
'default': {
'BACKEND': os.getenv('CACHE_BACKEND', 'django.core.cache.backends.locmem.LocMemCache'),
'LOCATION': os.getenv('CACHE_LOCATION', 'main-cache')
'BACKEND': os.getenv('CACHE_BACKEND', 'django.core.cache.backends.redis.RedisCache'),
'LOCATION': os.getenv('CACHE_LOCATION', 'redis://127.0.0.1:6379')
}
}

Expand All @@ -166,8 +166,8 @@ def get_list_from_env(variable, default=None):
# This project now requires connection to an OAuth server for authenticating users to make changes
# In the OCS, this would be the Observation Portal backend
OCS_AUTHENTICATION = {
'OAUTH_TOKEN_URL': os.getenv('OAUTH_TOKEN_URL', 'https://observe.photonranch.org/o/token/'),
'OAUTH_PROFILE_URL': os.getenv('OAUTH_PROFILE_URL', 'https://observe.photonranch.org/api/profile/'),
'OAUTH_TOKEN_URL': os.getenv('OAUTH_TOKEN_URL', 'http://observation-portal-dev.lco.gtn/o/token/'),
'OAUTH_PROFILE_URL': os.getenv('OAUTH_PROFILE_URL', 'http://observation-portal-dev.lco.gtn/api/profile/'),
'OAUTH_CLIENT_ID': os.getenv('OAUTH_CLIENT_ID', ''),
'OAUTH_CLIENT_SECRET': os.getenv('OAUTH_CLIENT_SECRET', ''),
'OAUTH_SERVER_KEY': os.getenv('OAUTH_SERVER_KEY', ''),
Expand Down Expand Up @@ -230,4 +230,4 @@ def get_list_from_env(variable, default=None):

CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_CREDENTIALS = True
CSRF_TRUSTED_ORIGINS = get_list_from_env('CSRF_TRUSTED_ORIGINS', 'http://localhost:8080,http://127.0.0.1:8000,http://127.0.0.1:8001')
CSRF_TRUSTED_ORIGINS = get_list_from_env('CSRF_TRUSTED_ORIGINS', 'http://localhost:8080,http://127.0.0.1:8000,http://127.0.0.1:8001,http://localhost:8000,')

0 comments on commit f20189c

Please sign in to comment.