Details
-
Task
-
Resolution: Done
-
Blocker
-
PE Milestone 8 (Eight Is Not Enough)
Description
The PE container image needs a command/script that the container entrypoint script can run to determine if the database configuration is good and the database is up and ready to receive connections.
In the version 4.x image the entrypoint script creates a Console command on the fly that has contents
App::import('Model', 'ConnectionManager'); |
|
class DatabaseTestShell extends AppShell { |
function main() {
|
try { |
$db = ConnectionManager::getDataSource('default'); |
} catch (Exception $e) { |
$this->error("Unable to connect to datasource"); |
}
|
$this->out("Connected to datasource"); |
}
|
}
|
We need something similar for PE. Preferably it would be part of the application and not need to be generated on the fly.