about summary refs log tree commit diff stats
path: root/classes/Config.php
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2024-02-18 12:34:17 +0300
committerAndrew Dolgov <fox@fakecake.org>2024-02-18 12:34:56 +0300
commiteb52a7da8e2cafa1892d3f8810a69435b7a9b854 (patch)
tree286a54c4ea0d153fb31ce69edb0b8233e8046934 /classes/Config.php
parent19b3e7fff80d430a9f287138f9cf84a1faa681fd (diff)
downloadthe-epube-eb52a7da8e2cafa1892d3f8810a69435b7a9b854.tar.gz
the-epube-eb52a7da8e2cafa1892d3f8810a69435b7a9b854.tar.xz
add pgsql support
Diffstat (limited to 'classes/Config.php')
-rw-r--r--classes/Config.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/classes/Config.php b/classes/Config.php
index 3fc8358..5f7b710 100644
--- a/classes/Config.php
+++ b/classes/Config.php
@@ -9,6 +9,12 @@ class Config {
 	// override defaults, defined below in _DEFAULTS[], via environment: DB_TYPE becomes EPUBE_DB_TYPE, etc
 
 	const DB_TYPE = "DB_TYPE";
+	const DB_HOST = "DB_HOST";
+	const DB_USER = "DB_USER";
+	const DB_NAME = "DB_NAME";
+	const DB_PASS = "DB_PASS";
+	const DB_PORT = "DB_PORT";
+
 	const SCRATCH_DB = "SCRATCH_DB";
 	const CALIBRE_DB = "CALIBRE_DB";
 	const BOOKS_DIR = "BOOKS_DIR";
@@ -22,6 +28,11 @@ class Config {
 
 	private const _DEFAULTS = [
 		Config::DB_TYPE => [ "sqlite", Config::T_STRING ],
+		Config::DB_HOST => [ "db", Config::T_STRING ],
+		Config::DB_USER => [ "", Config::T_STRING ],
+		Config::DB_NAME => [ "", Config::T_STRING ],
+		Config::DB_PASS => [ "", Config::T_STRING ],
+		Config::DB_PORT => [ "5432", Config::T_STRING ],
 		Config::SCRATCH_DB => [ "db/scratch.db", Config::T_STRING ],
 		Config::CALIBRE_DB => [ "", Config::T_STRING ],
 		Config::BOOKS_DIR => [ "", Config::T_STRING ],