Merge branch 'master' of ssh://git.autonomic.zone:2222/autonomic-cooperative/opencase

This commit is contained in:
Naomi 2020-11-20 11:03:19 +00:00
commit ca1a0eda29
2 changed files with 32 additions and 121 deletions

View File

@ -1,84 +0,0 @@
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 8 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},{
"type": "vcs",
"url": "https://git.autonomic.zone/autonomic-cooperative/opencase.git"
}
],
"require": {
"composer/installers": "^1.2",
"drupal/admin_toolbar": "^2.0",
"drupal/console": "*",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/datetimehideseconds": "1.x-dev",
"drupal/devel": "^2.1",
"drupal/facets": "^1.4",
"drupal/opencase": "^1.9.4",
"drupal/search_api": "^1.15",
"drupal/search_api_db": "^1.15",
"drupal/security_review": "1.x-dev",
"drupal/smtp": "^1.0@beta",
"drupal/superfish": "^1.3",
"drupal/views_aggregator": "^1.0@beta",
"drupal/views_data_export": "^1.0@beta",
"drush/drush": "^10.2"
},
"require-dev": {
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/{$name}": ["type:drupal-drush"]
},
"drupal-core-project-message": {
"include-keys": ["homepage", "support"],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, youve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}

View File

@ -1,51 +1,34 @@
SYSTEM
===========
apt install php-gd php-mbstring php-xml php-curl composer
a2enmod rewrite
composer create-project drupal/recommended-project:8.9.8 drupal
# ADD THIS TO drupal/composer.json IN THE REPOSITORIES SECTION
,{
"type": "vcs",
"url": "https://git.autonomic.zone/autonomic-cooperative/opencase.git"
}
# INSTALL MODULES VIA COMPOSER (this will add them to composer.json, which is better than using a premade one, because this way the versions will all sort themselves out)
composer require drupal/admin_toolbar drupal/security_review drupal/smtp drupal/opencase drupal/superfish
SITE
====
#TODO make the vhost
#TODO in apache2.conf set Override All on the directory
# CREATE DIRECTORIES AND SET UP FILE PERMISSIONS
DRUPAL
======
composer create-project drupal/recommended-project drupal
#TODO place composer.json in the drupal directory that should have appeared
composer install
mysql -uroot -p
drop database ...;
create database ...;
cd drupal
# start in drupal directory
mkdir -p config/sync
mkdir private
# if web server user =/= deployment user:
# start in drupal directory
sudo chgrp www-data config/sync
cd web
cp sites/default/default.settings.php sites/default/settings.php
sudo chgrp www-data . -R
mkdir sites/default/files
sudo chmod g+w sites/default/files -R
chmod g+w sites/default/settings.php
sudo find -type d -exec chmod g+s {} \;
# TODO run the installer
drush pm-uninstall search
drush en superfish admin_toolbar smtp superfish security_review opencase -y
# if web server user =/= deployment user:
sudo chmod g-w sites/default/
sudo chmod a-w sites/default/settings.php
sudo chmod g-w sites
sudo chmod g-w sites ./sites/example.settings.local.php ./sites/development.services.yml ./sites/example.sites.php ./sites/default/default.services.yml ./sites/default/default.settings.php ./autoload.php
sudo chmod g-w -R modules/
@ -59,14 +42,26 @@ drush en superfish admin_toolbar smtp superfish security_review opencase -y
sudo chmod g+w,o-r,o-x private
# INSTALL THE SITE
- Create a database
- Go to the url and run the installer
# make settings file unwriteable now that it has been generated
sudo chmod a-w sites/default/settings.php
# ENABLE all the above modules
drush en admin_toolbar security_review smtp opencase -y
# TODO set $trusted_host_patterns (in settings.php)
# TODO private files (/home/foo/drupal/private) (in settings.php)
# TODO private files (in settings.php)
# TODO Set all the HTML roles to admin only - /admin/config/content/formats
# TODO run security review (make eveything untrusted except CRM Admin and Admin) - /admin/config/security-review
# TODO homepage -> /opencase/all-cases, 403 - /user/login - /admin/config/system/site-information
# TODO homepage -> /opencase/whatever-the-chosen-homepage, 403 - /user/login - /admin/config/system/site-information
# TODO disable blocks: tools, main navigation, footer menu - /admin/structure/block
# TODO logo & colours - admin/appearance/settings/bartik
# TODO disallow registering an account & turn off personal contact forms - /admin/config/people/accounts
# TODO add linked actor field to form display and display display - top of both
# TODO change which contact form is the default - /admin/structure/contact
# TODO change "short" date formate to d/m/Y - /admin/config/regional/date-time
# TODO change "short" date formate to d/m/Y - /admin/config/regional/date-time