aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-18 17:46:03 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-18 17:46:03 -0200
commite01871f625bcdac93b2e4bb67d4a934253f4a06c (patch)
treea529897b11962bad13b5522cab97be453f571dbc /share
parentebdcbb94f235a2b0687d8497498074a20886d318 (diff)
downloadtemplater-e01871f625bcdac93b2e4bb67d4a934253f4a06c.tar.gz
templater-e01871f625bcdac93b2e4bb67d4a934253f4a06c.tar.bz2
Drupal 8: docs
Diffstat (limited to 'share')
-rw-r--r--share/templater/drupal8/files/Makefile.drupal88
-rw-r--r--share/templater/drupal8/files/README.drupal8.md81
-rwxr-xr-xshare/templater/drupal8/setup4
3 files changed, 89 insertions, 4 deletions
diff --git a/share/templater/drupal8/files/Makefile.drupal8 b/share/templater/drupal8/files/Makefile.drupal8
index 7ecafe4..2dfdcbc 100644
--- a/share/templater/drupal8/files/Makefile.drupal8
+++ b/share/templater/drupal8/files/Makefile.drupal8
@@ -143,10 +143,10 @@ reinitdb: destroydb initdb
# Cleanup develop environment
clean:
- vagrant halt
- vagrant destroy -f
- kvmx stop
- kvmx destroy
+ vagrant halt || true
+ vagrant destroy -f || true
+ kvmx stop || true
+ kvmx destroy || true
rm -rf vendor/drupal*
# Export configuration
diff --git a/share/templater/drupal8/files/README.drupal8.md b/share/templater/drupal8/files/README.drupal8.md
new file mode 100644
index 0000000..46069f3
--- /dev/null
+++ b/share/templater/drupal8/files/README.drupal8.md
@@ -0,0 +1,81 @@
+Drupal 8 Application HOWTO
+==========================
+
+This is the basic worflow for a Drupal 8 project set using
+[templater](https://templater.fluxo.info).
+
+Requirements
+------------
+
+Basique requirements are:
+
+* A [make](https://packages.debian.org/stable/make) implementation.
+* Container manager like vagrant, docker or [kvmx](https://kvmx.fluxo.info).
+
+Copying files
+-------------
+
+Put files and database dumps in the following folders:
+
+ rsync -avz --delete /path/to/backups/files/ files/
+ rsync -avz --delete /path/to/backups/sql/ sql/
+
+Check the Makefile.drupal8 for the db dump file name and format. Commands like
+the examples above can be used to transport files from production back to the
+development trees.
+
+Development
+-----------
+
+Create the development environment using
+
+ make develop
+
+You might need to setup vagrant, docker or kvmx first.
+
+## Default site installation
+
+If you need a fresh drupal database installation, do this in the project
+folder inside the container:
+
+ make site_install
+
+## Loading and reloading the database
+
+To load or reload the database from the latest dump available at the `sql/`
+folder, do the following in the project folder and inside the container:
+
+ make reinitdb
+
+## Acessing
+
+The exact port dependes on what you configured on your container configuration,
+but you should be able to reach your drupal installation at an address like
+
+ http://localhost:8080
+
+## Exporting configuration
+
+Export the configuration is easy. Do the following in the project folder and
+inside your container:
+
+ make export
+
+## Cleaning
+
+Cleaning is simple and can be run directly outside the container:
+
+ make clean
+
+Then the project is ready to be provisioned again into a container.
+
+Production
+----------
+
+Prodution provisioning example:
+
+ make production # setup environment
+ sudo vim settings.prod.php # add db info
+ sudo vim services.prod.yml # customize
+ sudo vim /var/www/data/drupal-8/sites/sites.php # add site into the pool
+ make initdb # initialize db from a dump
diff --git a/share/templater/drupal8/setup b/share/templater/drupal8/setup
index 738e4ec..85f0b7f 100755
--- a/share/templater/drupal8/setup
+++ b/share/templater/drupal8/setup
@@ -42,6 +42,10 @@ function templater_drupal8 {
cp $SHARE/drupal8/files/drupal.make.yml .
fi
+ if [ ! -e "README.drupal8.md" ]; then
+ cp $SHARE/drupal8/files/README.drupal8.md .
+ fi
+
if [ -d "puppet" ] && [ ! -e "puppet/Puppetfile" ]; then
cp $SHARE/drupal8/files/puppet/Puppetfile puppet/
else