mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 07:43:33 +00:00 
			
		
		
		
	sqlite3 and psql support
This commit is contained in:
		| @@ -4,19 +4,27 @@ if (!config.has('database')) { | ||||
| 	throw new Error('Database config does not exist! Please read the instructions: https://github.com/jc21/nginx-proxy-manager/blob/master/doc/INSTALL.md'); | ||||
| } | ||||
|  | ||||
| let data = { | ||||
| 	client:     config.database.engine, | ||||
| 	connection: { | ||||
| 		host:     config.database.host, | ||||
| 		user:     config.database.user, | ||||
| 		password: config.database.password, | ||||
| 		database: config.database.name, | ||||
| 		port:     config.database.port | ||||
| 	}, | ||||
| 	migrations: { | ||||
| 		tableName: 'migrations' | ||||
| 	} | ||||
| }; | ||||
| function generateDbConfig() { | ||||
| 	if (config.database.engine === 'knex-native') { | ||||
| 		return config.database.knex; | ||||
| 	} else | ||||
| 		return { | ||||
| 			client:     config.database.engine, | ||||
| 			connection: { | ||||
| 				host:     config.database.host, | ||||
| 				user:     config.database.user, | ||||
| 				password: config.database.password, | ||||
| 				database: config.database.name, | ||||
| 				port:     config.database.port | ||||
| 			}, | ||||
| 			migrations: { | ||||
| 				tableName: 'migrations' | ||||
| 			} | ||||
| 		}; | ||||
| } | ||||
|  | ||||
|  | ||||
| let data = generateDbConfig(); | ||||
|  | ||||
| if (typeof config.database.version !== 'undefined') { | ||||
| 	data.version = config.database.version; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user