# -*- coding: utf-8 -*- # Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string # for GA releases. APP_SUFFIX = '' ########################################################################## # Server settings ########################################################################## # The server mode determines whether or not we're running on a web server # requiring user authentication, or desktop mode which uses an automatic # default login. # # DO NOT DISABLE SERVER MODE IF RUNNING ON A WEBSERVER!! # # We only set SERVER_MODE if it's not already set. That's to allow the # runtime to force it to False. # # NOTE: If you change the value of SERVER_MODE in an included config file, # you may also need to redefine any values below that are derived # from it, notably various paths such as LOG_FILE and anything # using DATA_DIR. # This option allows the user to host the application on a LAN # Default hosting is on localhost (DEFAULT_SERVER='localhost'). # To host pgAdmin4 over LAN set DEFAULT_SERVER='0.0.0.0' (or a specific # adaptor address. # # NOTE: This is NOT recommended for production use, only for debugging # or testing. Production installations should be run as a WSGI application # behind Apache HTTPD. DEFAULT_SERVER = '127.0.0.1' # The default port on which the app server will listen if not set in the # environment by the runtime DEFAULT_SERVER_PORT = 5050 # Hashing algorithm used for password storage SECURITY_PASSWORD_HASH = 'pbkdf2_sha512' # NOTE: CSRF_SESSION_KEY, SECRET_KEY and SECURITY_PASSWORD_SALT are no # longer part of the main configuration, but are stored in the # configuration databases 'keys' table and are auto-generated. # Should HTML be minified on the fly when not in debug mode? # NOTE: The HTMLMIN module doesn't work with Python 2.6, so this option # has no effect on <= Python 2.7. MINIFY_PAGE = True DATA_DIR = '/opt/pgadmin/data' ########################################################################## # Log settings ########################################################################## # Debug mode? DEBUG = False LOG_FILE = '/opt/pgadmin/logs/pgadmin4.log' ########################################################################## # User account and settings storage ########################################################################## # The default path to the SQLite database used to store user accounts and # settings. This default places the file in the same directory as this # config file, but generates an absolute path for use througout the app. SQLITE_PATH = '/opt/pgadmin/db/pgadmin.db' # Allow database connection passwords to be saved if the user chooses. # Set to False to disable password saving. ALLOW_SAVE_PASSWORD = True ########################################################################## SESSION_DB_PATH = '/opt/pgadmin/sessions' SESSION_COOKIE_NAME = 'pga4_session' # Flask-Security overrides Flask-Mail's MAIL_DEFAULT_SENDER setting, so # that should be set as such: SECURITY_EMAIL_SENDER = 'no-reply@d4science.org' # Check for new versions of the application? UPGRADE_CHECK_ENABLED = False STORAGE_DIR = '/opt/pgadmin/storage' ########################################################################## # Default locations for binary utilities (pg_dump, pg_restore etc) # # These are intentionally left empty in the main config file, but are # expected to be overridden by packagers in config_distro.py. # # A default location can be specified for each database driver ID, in # a dictionary. Either an absolute or relative path can be specified. # In cases where it may be difficult to know what the working directory # is, "$DIR" can be specified. This will be replaced with the path to the # top-level pgAdmin4.py file. For example, on macOS we might use: # # $DIR/../../SharedSupport # ########################################################################## DEFAULT_BINARY_PATHS = { "pg": "", "ppas": "", "gpdb": "" } ########################################################################## # SSH Tunneling supports only for Python 2.7 and 3.4+ ########################################################################## SUPPORT_SSH_TUNNEL = False