mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Tweak settings.py to allow for TRUST-based PostgreSQL auth
This commit is contained in:
		@@ -144,13 +144,14 @@ DATABASES = {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
if os.getenv("PAPERLESS_DBUSER") and os.getenv("PAPERLESS_DBPASS"):
 | 
			
		||||
if os.getenv("PAPERLESS_DBUSER"):
 | 
			
		||||
    DATABASES["default"] = {
 | 
			
		||||
        "ENGINE": "django.db.backends.postgresql_psycopg2",
 | 
			
		||||
        "NAME": os.getenv("PAPERLESS_DBNAME", "paperless"),
 | 
			
		||||
        "USER": os.getenv("PAPERLESS_DBUSER"),
 | 
			
		||||
        "PASSWORD": os.getenv("PAPERLESS_DBPASS")
 | 
			
		||||
    }
 | 
			
		||||
    if os.getenv("PAPERLESS_DBPASS"):
 | 
			
		||||
        DATABASES["default"]["PASSWORD"] = os.getenv("PAPERLESS_DBPASS")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Password validation
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user