diff --git a/Dockerfile b/Dockerfile index 35fef53f..59d42084 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,6 +33,7 @@ RUN pip install --no-cache-dir /deps/*.whl COPY --from=builder /doccano /doccano +ENV IS_HEROKU="False" ENV DEBUG="True" ENV SECRET_KEY="change-me-in-production" ENV PORT="80" diff --git a/app/app/settings.py b/app/app/settings.py index 730c0b78..c4e804d4 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -219,7 +219,9 @@ APPLICATION_INSIGHTS = { 'ikey': AZURE_APPINSIGHTS_IKEY if AZURE_APPINSIGHTS_IKEY else None, } -django_heroku.settings(locals(), test_runner=False) +# work-around for django-heroku: don't overwrite sslmode outside of heroku +if env.bool('IS_HEROKU', True): + django_heroku.settings(locals(), test_runner=False) # work-around for dj-database-url: explicitly disable ssl for sqlite if DATABASES['default'].get('ENGINE') == 'django.db.backends.sqlite3':