Update standalone authored by DaveD's avatar DaveD
......@@ -126,6 +126,8 @@ $civicrm_setting['domain']['userFrameworkResourceURL'] = 'https://civi.example.o
## Initialize the database
### Using install files from an existing install
Copied `sql/civicrm.mysql` from a Drupal8 codebase, then:
```
......@@ -133,6 +135,44 @@ cat vendor/civicrm/civicrm-core/sql/civicrm.mysql | mysql -u civitest -p civites
cat vendor/civicrm/civicrm-core/sql/civicrm_generated.mysql | mysql -u civitest -p civitest
```
### Using GenCode instead
* Manually create a civicrm.config.php in vendor/civicrm/civicrm-core
```php
<?php
$settingsFile = '/path/to/civi-standalone/civicrm.settings.php';
define('CIVICRM_SETTINGS_PATH', $settingsFile);
$error = @include_once( $settingsFile );
if ( $error == false ) {
echo "Could not load the settings file at: {$settingsFile}\n";
exit( );
}
```
* Apply this patch to vendor/civicrm/civicrm-core
```diff
--- CRM/Core/CodeGen/Config.php.orig
+++ CRM/Core/CodeGen/Config.php
@@ -16,11 +16,12 @@
'drupal8',
'joomla',
'wordpress',
+ 'standalone',
])) {
echo "Config file for '{$this->config->cms}' not known.";
exit();
}
- elseif ($this->config->cms !== 'joomla') {
+ elseif ($this->config->cms !== 'joomla' && $this->config->cms !== 'standalone') {
$configTemplate = $this->findConfigTemplate($this->config->cms);
if ($configTemplate) {
echo "Generating civicrm.config.php\n";
```
* Run `cd xml && php GenCode.php 0 0 Standalone`
* Then you can use the civicrm.mysql and civicrm_data.mysql files in sql (or if you want sample data you can use civicrm_generated.mysql instead of civicrm_data.mysql).
# Example nginx vhost
(adapt to your environment)
......@@ -214,3 +254,5 @@ server {
}
```
For apache in addition to setting up the virtual host, you can then put the stock Drupal 7 .htaccess in web.
\ No newline at end of file