... | @@ -73,7 +73,7 @@ Presumably we will want some sort of composer template, so that people can also |
... | @@ -73,7 +73,7 @@ Presumably we will want some sort of composer template, so that people can also |
|
|
|
|
|
Since the installer does not work, generate manually:
|
|
Since the installer does not work, generate manually:
|
|
|
|
|
|
```
|
|
```https://github.com/civicrm/civicrm-core/pull/22227
|
|
cd /var/www/standalone/
|
|
cd /var/www/standalone/
|
|
cp vendor/civicrm/civicrm-core/templates/CRM/common/civicrm.settings.php.template civicrm.settings.php
|
|
cp vendor/civicrm/civicrm-core/templates/CRM/common/civicrm.settings.php.template civicrm.settings.php
|
|
```
|
|
```
|
... | @@ -98,41 +98,10 @@ $civicrm_paths['civicrm.bower']['path'] = '/var/www/standalone/web/assets/civicr |
... | @@ -98,41 +98,10 @@ $civicrm_paths['civicrm.bower']['path'] = '/var/www/standalone/web/assets/civicr |
|
|
|
|
|
## Initialize the database
|
|
## Initialize the database
|
|
|
|
|
|
### Using GenCode
|
|
Assuming you have applied [this patch](https://github.com/civicrm/civicrm-core/pull/22227) on civicrm-core:
|
|
|
|
|
|
* Manually create a civicrm.config.php in vendor/civicrm/civicrm-core
|
|
|
|
|
|
|
|
```php
|
|
### Using GenCode
|
|
<?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`
|
|
* 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).
|
|
* 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).
|
|
|
|
|
... | @@ -145,7 +114,7 @@ cat vendor/civicrm/civicrm-core/sql/civicrm_data.mysql | mysql -u civitest -p ci |
... | @@ -145,7 +114,7 @@ cat vendor/civicrm/civicrm-core/sql/civicrm_data.mysql | mysql -u civitest -p ci |
|
|
|
|
|
# Example nginx vhost
|
|
# Example nginx vhost
|
|
|
|
|
|
(adapt to your environment)
|
|
(adapt to your environment, this example uses php-8.0)
|
|
|
|
|
|
```
|
|
```
|
|
server {
|
|
server {
|
... | @@ -159,7 +128,6 @@ server { |
... | @@ -159,7 +128,6 @@ server { |
|
try_files $uri 404;
|
|
try_files $uri 404;
|
|
}
|
|
}
|
|
|
|
|
|
# Redirect to main GERT site
|
|
|
|
location / {
|
|
location / {
|
|
return 301 https://test.example.org$uri;
|
|
return 301 https://test.example.org$uri;
|
|
}
|
|
}
|
... | @@ -222,12 +190,13 @@ server { |
... | @@ -222,12 +190,13 @@ server { |
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
For apache in addition to setting up the virtual host, you can then put the stock Drupal 7 .htaccess in web.
|
|
For apache in addition to setting up the virtual host, you can then put the stock Drupal 7 .htaccess in web.
|
|
|
|
|
|
# Menubar notes
|
|
# Menubar notes
|
|
|
|
|
|
|
|
(edit ML: this should be fixed in PR 22227)
|
|
|
|
|
|
* Need to create a dummy file css/menubar-standalone.css
|
|
* Need to create a dummy file css/menubar-standalone.css
|
|
* If you comment out the `$contactID` part from this line in CRM/Core/Resources/Common.php then it will try to do the menubar, but there's still js errors because crm-l10n isn't being generated correctly: `$contactID && !CRM_Core_Config::singleton()->userFrameworkFrontend`. |
|
* If you comment out the `$contactID` part from this line in CRM/Core/Resources/Common.php then it will try to do the menubar, but there's still js errors because crm-l10n isn't being generated correctly: `$contactID && !CRM_Core_Config::singleton()->userFrameworkFrontend`. |
|
|
|
\ No newline at end of file |