Skip to content

Commit 85db446

Browse files
committed
env: use port 9080 for debugging, fix PG password
1 parent caca1b2 commit 85db446

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

app/settings.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
env = environ.Env()
1212

1313
# Django settings for server project.
14-
DEBUG = env('DEBUG') # False if not in os.environ
14+
DEBUG = True if env('DEBUG') == 'True' else False
1515

1616
ADMINS = (
1717
('Guillaume Pellerin', 'guillaume.pellerin@ircam.fr'),
@@ -245,7 +245,8 @@
245245
CELERY_CACHE_BACKEND = 'django-cache'
246246
CELERY_TASK_SERIALIZER = "json"
247247
CELERY_ACCEPT_CONTENT = ['application/json']
248-
CELERY_TASK_ALWAYS_EAGER = env('CELERY_TASK_ALWAYS_EAGER') # If this is True, all tasks will be executed locally by blocking until the task returns.
248+
# If this is True, all tasks will be executed locally by blocking until the task returns.
249+
CELERY_TASK_ALWAYS_EAGER = True if env('DEBUG') == 'True' else False
249250

250251
BOWER_COMPONENTS_ROOT = '/srv/static/'
251252
BOWER_PATH = '/usr/local/bin/bower'
@@ -264,10 +265,10 @@
264265
CORS_ALLOW_CREDENTIALS = True
265266

266267
SESSION_COOKIE_SAMESITE = None
267-
SESSION_COOKIE_SECURE = False if os.environ.get('DEBUG') == 'True' else True
268+
SESSION_COOKIE_SECURE = False if env('DEBUG') == 'True' else True
268269

269270
CSRF_COOKIE_SAMESITE = None
270-
CSRF_COOKIE_SECURE = False if os.environ.get('DEBUG') == 'True' else True
271+
CSRF_COOKIE_SECURE = False if env('DEBUG') == 'True' else True
271272

272273
X_FRAME_OPTIONS = 'ALLOWALL'
273274
XS_SHARING_ALLOWED_METHODS = ['POST','GET','OPTIONS', 'PUT', 'DELETE']

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ app:
6666
expose:
6767
- "8000"
6868
ports:
69-
- "9030:8000"
69+
- "9080:8000"
7070

7171

7272
worker:

env/debug.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
POSTGRES_PASSWORD=mysecretpassword
2+
13
DEBUG=True
24

35
SECRET_KEY=ghv8us2587n97dq&w$c((o5rj_$-9#d-8j#57y_a9og8wux1h7

timeside/server/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def execute_task(self, request, queryset):
4949
task.status = 2
5050
task.save()
5151

52-
execute_task.short_description = "Execute tasks"
52+
execute_task.short_description = "Execute selected Tasks"
5353

5454

5555
class ResultAdmin(admin.ModelAdmin):

0 commit comments

Comments
 (0)