PHP code example of cockpit-hq / cockpit
1. Go to this page and download the library: Download cockpit-hq/cockpit library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cockpit-hq / cockpit example snippets
// config/config.php
return [
'database' => [
'server' => $_ENV['COCKPIT_DATABASE_SERVER'] ?? 'mongodb://mongo:27017',
'database' => $_ENV['COCKPIT_DATABASE_NAME'] ?? 'cockpit'
],
'sec-key' => $_ENV['COCKPIT_SEC_KEY'] ?? 'your-random-security-key'
];
dockerfile
FROM cockpithq/cockpit:core-latest
COPY ./config/config.php /var/www/html/config/config.php