Commit 5953b1b6 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Add Asciidoctor documentation

parent be9b835e
......@@ -29,3 +29,5 @@ sflinux
# Ignore ssh keys
deploy/id_rsa*
README.html
= SFL Boilerplate: a generic template for Drupal projects
:keywords: Drupal, SFL, SFLinux, AsciiDoc, Asciidoctor
:page-layout: base
:page-description: {description}
:page-keywords: {keywords}
ifdef::env-site[]
:toc:
:toc-placement: preamble
endif::[]
ifndef::env-site[]
:toc: right
:icons: font
:idprefix:
:idseparator: -
:sectanchors:
:source-highlighter: highlight.js
endif::[]
:experimental:
:mdash: —
:language: asciidoc
:source-language: {language}
:table-caption!:
:example-caption!:
:figure-caption!:
:imagesdir: ../images
:includedir: _includes
// Refs
:asciidoc-dl-ref: http://sourceforge.net/projects/asciidoc/files/latest/download
:asciidoc-editor-ref: http://asciidoc.org/#_editor_support
:asciidoc-faq-ref: http://asciidoc.org/faq.html
:asciidoc-guide-ref: http://asciidoc.org/userguide.html
:asciidoc-install-ref: http://asciidoc.org/INSTALL.html
:asciidoc-list-ref: http://groups.google.com/group/asciidoc
:asciidoctor-ref: http://asciidoctor.org/
:asciidoctor-gem-ref: https://rubygems.org/gems/asciidoctor
:uri-install: http://asciidoctor.org/docs/install-toolchain/
:fopub-doc-ref: https://github.com/asciidoctor/asciidoctor-fopub/blob/master/README.adoc
:user-ref: http://asciidoctor.org/docs/user-manual
:docs-ref: http://asciidoctor.org/docs
:uri-editing: http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/
:gist-ref: http://gist.github.com
:publican-ref: https://fedorahosted.org/publican
:sfl-wiki-drupal: https://wiki.savoirfairelinux.com/wiki/Pratique_Drupal
:doc-docker: https://www.docker.com/
:doc-fabric: http://www.fabfile.org/
:doc-docker-installation: https://docs.docker.com/engine/installation/
:doc-docker-baseimage: https://gitlab.savoirfairelinux.com/drupal/docker-lampd/
:uri-what-asciidoc: http://asciidoctor.org/docs/what-is-asciidoc-why-use-it
/ __/ __/ / / _/ |/ / / / / |/_/
_\ \/ _// /___/ // / /_/ /> <
/___/_/ /____/___/_/|_/\____/_/|_|
// (to make a title: echo " CLIENT.PROJECT" | figlet -f smslant )
This *generic template* aims at _implementating_ a default project tree, that then could be used as a *starter kit* for new Drupal projects.
TIP: More information on our Drupal practices at Savoir-faire Linux are described in {sfl-wiki-drupal}[the official Wiki].
== System Requirements
This installation profile has been designed to work with Drupal 7, and is compatible with PHP > 5.3.
Ensure your system is properly installed.
TIP: Whenever it is possible, you should use *Composer* to install and manage the PHP dependencies.
The following dependencies need to be installed:
* {doc-docker}[Docker]
* {doc-docker-baseimage}[Docker base image]
* {doc-fabric}[Fabric]
* Drush (version 6 or version 7)
== Installation
CAUTION: The installation procedure to set-up Docker is not described here. Please refer to the official documentation on how to install {doc-docker-installation}[Docker Engine]. The {doc-docker-baseimage}[Docker base image] should also be installed at this point.
First, you should clone this repository.
$ git clone --recursive https://gitlab.savoirfairelinux.com/drupal/sfl-boilerplate.git
It is recommanded to clone with the _recursive_ option to automatically fetch the included _git submodules_.
Then, copy and, optionally, edit your local configuration file:
$ cp deploy/local_vars.py drupalizer/local_vars.py
You are now ready to build the SFLinux distribution:
$ cd drupalizer
$ fab local_setup
The Docker image containing the Drupal installation should now be up and running, and the site should now be accessible at http://local.boilerplate.sfl.
== Official documentation
More on Drupal distributions: https://www.drupal.org/documentation/build/distributions.
More on Drush and Makefile: https://www.drupal.org/node/1432374.
== About this document
This document uses the Asciidoc syntax generator. It is a convenient
tool allowing to write documentation in raw text files, and convert
them to HTML or PDF later on.
To generate a HTML version, first install asciidoctor package on your
Linux distribution, then issue following command:
$ asciidoctor README.adoc
The README.html is generated in the current directory.
If you prefer the PDF format, install dblatex package on your Linux
distribution, then issue following command:
$ a2x -f pdf --dblatex-opts "-P latex.output.revhistory=0" README.adoc
The README.pdf file shall be created.
Docker-Drupal-sflboilerplate
============================
This repo contains a recipe for making a [Docker](http://docker.io) image for Drupal.
To build, make sure you have Docker [installed](http://www.docker.io/gettingstarted/).
This will try to go in line with [Drupal automated-testing](https://drupal.org/automated-testing).
## Install docker:
First, check that your APT system can deal with https URLs: the file /usr/lib/apt/methods/https should exist. If it doesn't, you need to install the package apt-transport-https.
```
[ -e /usr/lib/apt/methods/https ] || {
apt-get update
apt-get install apt-transport-https
}
```
Then, add the Docker repository key to your local keychain.
```
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
```
Add the Docker repository to your apt sources list, update and install the lxc-docker package.
```
sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
```
Add your user to the docker group to be able to execute docker command wihtout sudo
```
adduser <user> docker
```
## This project depend of [Docker-BaseImage](https://gitlab.savoirfairelinux.com/erortiz/docker-lampd/tree/master).
This project use like [Docker-BaseImage](https://gitlab.savoirfairelinux.com/erortiz/docker-lampd/tree/master) base image. Then we first need to clone this project and build the sflinux/baseimage. Information about build this image is here [Docker-BaseImage](https://gitlab.savoirfairelinux.com/erortiz/docker-lampd/tree/master), but in resume you need:
Clone the repo some where
```
git clone https://gitlab.savoirfairelinux.com/erortiz/docker-lampd.git
cd docker-lampd
```
and then build it:
```
sudo docker build -t sflinux/baseimage .
```
This can take a while but should eventually return a command prompt. It's done when it says "Successfully built {hash}"
That's it!
## Now is time to build our project sfl-boilerplate.
Is almost the same procedure
Clone the repo some where but you need to clone the branch docker
```
git clone -b docker https://gitlab.savoirfairelinux.com/drupal/sfl-boilerplate.git
```
Get the submodule to deploy the site:
```
cd sfl-boilerplate
git submodule init
git submodule update
```
Copy and change at your needs the file local_vars.py from the directory /deploy to /drupy:
```
cp deploy/local_vars.py drupy/local_vars.py
nano drupay/local_vars.py
```
Build the site and setup all configurations:
```
cd drupy
fab local_setup
```
That's it!
## Contributing
Feel free to fork and contribute to this code. :)
## Authors
Created and maintained by [Ernesto Rodriguez Ortiz][author] (ernesto.rodriguezortiz@savoirfairelinux.com>)
## License
GPL v2
#!/bin/bash
# site-update
#
# Script de mise à jour d'un site
#
# Pour mettre à jour un site :
# - modifier le fichier .make du profil d'installation
# - ./site-update
# set -x
# set -e
WORKSPACE=`pwd`
DRUPAL_ROOT=`pwd`/src/drupal
cd $DRUPAL_ROOT
# Mise a jour du core et des modules
drush make ../../build/sfl-boilerplate.make -y || exit 1
# Déclenchement des éventuels hook_install_N()
drush updb -y
# Reconfiguration de l'environnement
drush d-conf
# Vidage des caches
drush cc all
exit 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment