MLabs\Installer
Synopsis
class Installer
{
- // members
- private static string $version = "0.1";
- private static string $version_jquery = "2.1.4";
- private static string $version_bootstrap = "3.3.5";
- private static string $version_silverstripe = "3.1.12";
- private static string $config_from = "cli";
- private static string $root_dir_code = "mysite/code/";
- private static string $root_dir_theme = "themes/";
- private static string $root_dir_default_theme = "themes/simple/templates/";
- private static string $root_dir_config = "mysite/_config/";
- private static string $root_dir_vendor = "vendor/MLabs/";
- private static string $config_composer = "composer.json";
- private static string $config_silverstripe = "mysite/_config/config.yml";
- private static string $config_silverstripe_old = "mysite/_config.php";
- private static string $config_silverstripe_environment = "_ss_environment.php";
- private static string $root_dir_web = "/var/customers/webs/";
- private static string $root_dir_logfiles = "/var/customers/logs/";
- private static string $owner_user_web = "www-data";
- private static string $owner_group_web = "www-data";
- private static string $project_company = "MLabs Development and Design";
- private static string $project_company_adress = "Kirchgasse 31";
- private static string $project_company_destination = "92360 Mühlhausen";
- private static string $project_company_email = "info@mlaboratories.de";
- private static string $project_company_web = "http://mlaboratories.de";
- private static string $project_database_server = "localhost";
- private static string $project_database_name = "[database_name]";
- private static string $project_database_username = "[database_username]";
- private static string $project_database_password = "[database_password]";
- private static string $project_environment_type = "dev";
- private static string $default_admin_username = "admin";
- private static string $default_admin_password = "[default_admin_password]";
- private static string $domain = "[domain]";
- private static string $froxlor_username = "[froxlor_username]";
- private static $event = NULL;
- // methods
- public static void postUpdate()
- public static void postInstall()
- public static void getComposerEvent()
- public static void getRootDirCode()
- public static void getRootDirTheme()
- public static void getRootDirConfig()
- public static void getRootDirVendor()
- protected static void tasks()
- protected static void exitInstaller()
- protected static void getConfig()
- protected static void getConfigFromCommandline()
- protected static void getConfigFromFile()
- protected static void getConfigFromDatabase()
- protected static void checkSystemRequirements()
- protected static void changeOwner()
- protected static void createFolderStructure()
- protected static void moveFiles()
- protected static void copyFiles()
- protected static void build()
- protected static void addRepositories()
- protected static void addEnvironmentSettings()
- protected static void addControllerVars()
- protected static void addConfigErrorLog()
- protected static void addConfigEmailLog()
- protected static void blockRequirements()
- protected static void requirementsGoogleJquery()
- protected static void requirementsJqueryChosen()
- protected static void requirementsCDNBootstrap()
- protected static void addMeta()
- protected static void executableUserRights()
- protected static void resetUserRights()
- protected static boolean hasNginx()
- protected static boolean hasFroxlor()
- protected static boolean hasSake()
Tasks
Line | Task |
---|---|
161 | use a class like Config with functions like Config->get('domain') which readed from environment.yml |
193 | |
198 | |
442 | compan_* variables from command line otherwise use this one |
Members
private
-
$config_composer
config path settings - $config_from
- $config_silverstripe
- $config_silverstripe_environment
- $config_silverstripe_old
- $default_admin_password
- $default_admin_username
- $domain
- $event
- $froxlor_username
- $owner_group_web
- $owner_user_web
-
$project_company
silverstripe project settings - $project_company_adress
- $project_company_destination
- $project_company_email
- $project_company_web
- $project_database_name
- $project_database_password
- $project_database_server
- $project_database_username
- $project_environment_type
-
$root_dir_code
silverstripe filestructure - $root_dir_config
- $root_dir_default_theme
- $root_dir_logfiles
- $root_dir_theme
- $root_dir_vendor
-
$root_dir_web
webserver settings -
$version
installer settings - $version_bootstrap
- $version_jquery
- $version_silverstripe
Methods
protected
- addConfigEmailLog() — adding warn and error log for email
- addConfigErrorLog() — adding warn and error log to silverstripe _config.php
- addControllerVars() — add some usefull controller vars
- addEnvironmentSettings() — add some settings to __ss_environment.php for silverstripe needed to run sake
- addMeta() — add meta name, content and $MetaTags(true) to default theme
- addRepositories() — add silverstripe addons must done here an error occurs if it in composer.json on install it
- blockRequirements() — add Requirements::block for delivered jquery to use newer version in frontend
- build() — build and flush silverstripe cms
- changeOwner() — change the owner-user and owner-group to get access via php5-fpm process recursiv for project
- checkSystemRequirements() — check for some system requirements which are needed to run installer
- copyFiles() — copy some files
- createFolderStructure() — create a default folder structure for projects
- executableUserRights() — make some files and folders executable via web to add some configs or upload assets
- exitInstaller()
- getConfig() — get config for installer
- getConfigFromCommandline() — get config information from command line
- getConfigFromDatabase()
- getConfigFromFile()
- hasFroxlor() — check if froxlor installed
- hasNginx() — check if nginx is installed
- hasSake() — check if sake installed otherwise install it
- moveFiles() — move the silverstripe-installer from vendor to project root and delete directory structure in vendor
- requirementsCDNBootstrap() — add Requirements:: for bootstrap from cdn
- requirementsGoogleJquery() — add Requirements::javascript jquery from googleapis in _config.php that is loaded bevore all other javascripts can be loaded prevent $. is not defined
- requirementsJqueryChosen()
- resetUserRights() — reset user rights to default to prevent access via web
- tasks() — task handler with install or update mode