Minimal fixes master
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 30 Oct 2026 18:40:20 +0000 (19:40 +0100)
committerRadek Czajka <rczajka@rczajka.pl>
Fri, 30 Oct 2026 18:40:20 +0000 (19:40 +0100)
Dockerfile
src/redakcja/settings/__init__.py
src/redakcja/settings/defaults.py

index 256a22c..cda7f2f 100644 (file)
@@ -79,11 +79,11 @@ ARG GID=8200
 # 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
index b204d0a..f238349 100644 (file)
@@ -1,11 +1,15 @@
 # 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
 
@@ -15,6 +19,16 @@ STATICFILES_DIRS = [
     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',
index cb49c8d..297cd42 100644 (file)
@@ -49,6 +49,8 @@ USE_L10N = True
 # 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).
@@ -64,6 +66,7 @@ BROKER_URL = 'django://'
 
 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'}