# COPY nginx.conf conf.d/...
RUN addgroup -g $GID app && addgroup nginx app
-COPY --from=static-builder /app/var/static /app/var/static
+COPY --from=static-builder /app/src/static /app/var/static
-FROM base AS prod
+FROM prod-base AS prod
-COPY --from=static-builder /app/var/static/staticfiles.json /app/var/static/staticfiles.json
+COPY --from=static-builder /app/src/static/staticfiles.json /app/src/static/staticfiles.json
# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-import os.path
+import os
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from .defaults import *
-from ..localsettings import *
+
+try:
+ from ..localsettings import *
+except ImportError:
+ pass
DATA_UPLOAD_MAX_MEMORY_SIZE = 20000000
PROJECT_ROOT + '/static/'
]
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.postgresql',
+ 'HOST': 'db',
+ 'USER': os.environ.get('POSTGRES_USER'),
+ 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'),
+ 'NAME': os.environ.get('POSTGRES_USER'),
+ }
+}
+
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
STATIC_ROOT = PROJECT_ROOT + '/../static/'
+CATALOGUE_REPO_PATH = MEDIA_ROOT + '/repo'
+CATALOGUE_IMAGE_REPO_PATH = MEDIA_ROOT + '/imgrepo'
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
SHOW_APP_VERSION = False
+CAS_SERVER_URL = None
CAS_APPLY_ATTRIBUTES_TO_USER = True
CAS_RENAME_ATTRIBUTES = {
'email': 'email', 'firstname': 'first_name', 'lastname': 'last_name'}