2020-11-09 12:36:08 +00:00
2020-11-19 17:38:41 +00:00
composer create-project drupal/recommended-project:8.9.8 drupal
2020-11-09 17:50:09 +00:00
2020-11-19 17:38:41 +00:00
# ADD THIS TO drupal/composer.json IN THE REPOSITORIES SECTION
,{
2020-11-09 17:50:09 +00:00
2020-11-19 17:38:41 +00:00
"type": "vcs",
"url": "https://git.autonomic.zone/autonomic-cooperative/opencase.git"
}
2020-11-09 12:36:08 +00:00
2020-11-09 17:50:09 +00:00
2020-11-19 17:38:41 +00:00
# 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
2020-11-09 17:50:09 +00:00
2020-11-19 17:38:41 +00:00
# CREATE DIRECTORIES AND SET UP FILE PERMISSIONS
2020-11-09 12:36:08 +00:00
2020-11-19 17:38:41 +00:00
# start in drupal directory
2020-11-09 12:36:08 +00:00
mkdir -p config/sync
mkdir private
# if web server user =/= deployment user:
2020-11-19 17:38:41 +00:00
# start in drupal directory
2020-11-09 12:36:08 +00:00
sudo chgrp www-data config/sync
cd web
2020-11-19 17:38:41 +00:00
cp sites/default/default.settings.php sites/default/settings.php
2020-11-09 12:36:08 +00:00
sudo chgrp www-data . -R
2020-11-19 17:38:41 +00:00
mkdir sites/default/files
2020-11-09 12:36:08 +00:00
sudo chmod g+w sites/default/files -R
2020-11-19 17:38:41 +00:00
chmod g+w sites/default/settings.php
2020-11-09 12:36:08 +00:00
sudo find -type d -exec chmod g+s {} \;
sudo chmod g-w sites/default/
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/
sudo chmod g-w -R core
sudo chmod g-w profiles index.php update.php
sudo chmod g-w themes -R
sudo chmod g-w web.config robots.txt
cd ../
sudo chmod g-w -R web/modules
sudo chgrp www-data private
sudo chmod g+w,o-r,o-x private
2020-11-19 17:38:41 +00:00
# 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
2020-11-09 12:36:08 +00:00
# TODO set $trusted_host_patterns (in settings.php)
2020-11-19 17:38:41 +00:00
# TODO private files (in settings.php)
2020-11-09 12:36:08 +00:00
# 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
2020-11-19 17:38:41 +00:00
# TODO homepage -> /opencase/whatever-the-chosen-homepage, 403 - /user/login - /admin/config/system/site-information
2020-11-09 12:36:08 +00:00
# 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
2020-11-19 17:38:41 +00:00
# TODO change "short" date formate to d/m/Y - /admin/config/regional/date-time