deployment stuff
[redakcja.git] / src / redakcja / settings / defaults.py
index cb49c8d..11edc51 100644 (file)
@@ -1,18 +1,17 @@
 # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
 #
 # 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
 
 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
 
 DATABASES = {
     'default': {
 
 PROJECT_ROOT = os.path.realpath(os.path.dirname(os.path.dirname(__file__)))
 
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': os.path.join(PROJECT_ROOT, 'dev.sqlite'), # Or path to database file if using sqlite3.
-        'USER': '',                      # Not used with sqlite3.
-        'PASSWORD': '',                  # Not used with sqlite3.
-        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
-        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
+        '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'),
     }
 }
 
     }
 }
 
@@ -49,6 +48,8 @@ USE_L10N = True
 # Example: "/home/media/media.lawrence.com/"
 MEDIA_ROOT = PROJECT_ROOT + '/media/dynamic'
 STATIC_ROOT = PROJECT_ROOT + '/../static/'
 # 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).
 
 # 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 +65,7 @@ BROKER_URL = 'django://'
 
 SHOW_APP_VERSION = False
 
 
 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'}
 CAS_APPLY_ATTRIBUTES_TO_USER = True
 CAS_RENAME_ATTRIBUTES = {
     'email': 'email', 'firstname': 'first_name', 'lastname': 'last_name'}
@@ -75,3 +77,7 @@ LEGIMI_USERNAME = None
 LEGIMI_PASSWORD = None
 LEGIMI_PUBLISHER_ID = None
 
 LEGIMI_PASSWORD = None
 LEGIMI_PUBLISHER_ID = None
 
+MIN_COVER_SIZE = (800, 800)
+
+REMOTE_BUILD_URL = os.environ.get('REMOTE_BUILD_URL')
+REMOTE_BUILD_TOKEN = os.environ.get('REMOTE_BUILD_TOKEN')