Commit f0406f79 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Port SFLboilerplate to drupalizer 2.x

parent 0a4d2c65
......@@ -4,16 +4,16 @@ FROM savoirfairelinux/lampd
MAINTAINER Ernesto Rodriguez Ortiz <ernesto.rodriguezortiz@savoirfairelinuc.com>
# Create project root directory and copy the structure
RUN mkdir /opt/sfl-boilerplate
COPY . /opt/sfl-boilerplate
RUN mkdir -p /opt/sfl
COPY . /opt/sfl
# Setup ssh keys to clone git repo
RUN mv /opt/sfl-boilerplate/conf/id_rsa* /root/.ssh/
RUN mv /opt/sfl/conf/id_rsa* /root/.ssh/
RUN cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
RUN chmod 600 /root/.ssh/id_rsa*
RUN exec ssh-agent /bin/bash && ssh-add /root/.ssh/id_rsa
RUN ssh-keyscan gitlab.savoirfairelinux.com >> /root/.ssh/known_hosts
#Copy vhost configuration and enable modules
RUN cp /opt/sfl-boilerplate/conf/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN cp /opt/sfl/conf/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite vhost_alias
......@@ -26,12 +26,13 @@ endif::[]
: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/
:doc-docker-baseimage: https://hub.docker.com/r/savoirfairelinux/lampd/
:doc-drush: http://docs.drush.org/en/master/
:gitlab-sflinux: https://gitlab.savoirfairelinux.com/drupal/sflinux
:doc-asciidoctor: http://asciidoctor.org/docs/asciidoc-recommended-practices/
image::http://test.savoirfairelinux.com/buildStatus/icon?job=drupal-sfl-boilerplate[Build status]
__________ _____ ____ ___ __ ____
/ __/ __/ / / _/ |/ / / / / |/_/ /_ /__ __
_\ \/ _// /___/ // / /_/ /> < / / \ \ /
......@@ -56,13 +57,12 @@ TIP: Whenever it is possible, you should use *Composer* to install and manage th
The following dependencies need to be installed:
* {doc-docker}[Docker]
* {doc-docker-baseimage}[Docker base image]
* {doc-fabric}[Fabric]
* {doc-drush}[Drush] (version 6 or 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.
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 Docker image is based on our {doc-docker-baseimage}[Docker base image], that will automatically installed at setup.
First, you should clone this repository.
......
#********************************
# WARNING WARNING WARNING
#********************************
from os import path
# YOU MUST COPY THIS FILE IN THE SUBMODULE DIRECTORY FOLDER
from fabric.api import env
# If you want to override the variable definitions of the submodule drupy, you must
# copy and paste this file in the directory of the submodule so it can be imported.
# Project settings
# When you create a file local_vars.py and define the values there, the fabfile.py file will use
# your values and not the values defined in this file.
env.project_name = 'sfl_boilerplate'
env.workspace = path.join(path.dirname(__file__), path.pardir)
env.interactive_mode = True
env.locale = False
# Site
#********************************
# END WARNING
#********************************
env.site_root = '{}/src/drupal'.format(env.workspace)
env.site_name = 'SFL Boilerplate'
env.site_profile = 'sflinux'
env.site_profile_repo = 'git@gitlab.savoirfairelinux.com:drupal/sflinux.git'
env.site_profile_makefile = 'build/build-sflinux-7.x.make'
env.site_db_user = 'dev'
env.site_db_pass = 'dev'
env.site_db_host = 'localhost'
env.site_db_name = 'sfl_boilerplate'
env.site_hostname = 'local.boilerplate.sfl'
env.site_admin_user = 'admin'
env.site_admin_pass = 'admin'
env.site_subdir = 'default'
from os import path
# The Apache user
APACHE = 'www-data'
# Docker
# Variables to use at your local machine
LOCAL_WORKSPACE = path.join(path.dirname(__file__), path.pardir)
LOCAL_DRUPAL_ROOT = '{}/src/drupal'.format(LOCAL_WORKSPACE)
env.docker_workspace = '/opt/sfl'
env.docker_site_root = '{}/src/drupal'.format(env.docker_workspace)
env.bind_port = 8001
env.apache_user = 'www-data'
# Variables to use inside the docker container
DOCKER_WORKSPACE = "/opt/sfl_boilerplate"
DOCKER_DRUPAL_ROOT = "/var/www/drupal"
DOCKER_PORT_TO_BIND = 8001
# Database variables
DB_USER = 'dev'
DB_PASS = 'dev'
DB_HOST = 'localhost'
DB_NAME = 'sfl_boilerplate'
# Hook commands
env.hook_post_install = ['drush fra -y', 'drush cc all']
# Site variables
SITE_NAME = 'SFL Boilerplate'
SITE_SUBDIR = 'default'
SITE_PROFILE = 'sflinux'
SITE_ADMIN_NAME = 'admin'
SITE_ADMIN_PASS = 'admin'
SITE_ENVIRONMENT = 'local'
SITE_HOSTNAME = 'local.boilerplate.sfl'
# Projects variables
PROJECT_NAME = 'sfl_boilerplate'
PROFILE = {'sflinux':'git@gitlab.savoirfairelinux.com:drupal/sflinux.git'}
PROFILE_MAKE_FILE = 'build/build-sflinux.make'
DRUSH='drush8'
# Drush commands to be run at the end of the installation process
POST_INSTALL = ['drush d-conf', 'drush fra -y', 'drush po-import fr --custom-only', 'drush cc all']
POST_INSTALL = ['drush fra -y', 'drush po-import fr --custom-only', 'drush cc all']
# Drush commands to be run at the end of the update process
POST_UPDATE = ['drush d-conf', 'drush fra -y', 'drush po-import fr --custom-only', 'drush cc all']
......
<VirtualHost *:80>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/drupal
DocumentRoot /opt/sfl/src/drupal
<Directory /var/www/drupal>
<Directory /opt/sfl/src/drupal/>
Options FollowSymLinks
AllowOverride All
Require all granted
......@@ -11,4 +11,4 @@
ErrorLog ${APACHE_LOG_DIR}/drupal_error.log
CustomLog ${APACHE_LOG_DIR}/drupal_access.log combined
</VirtualHost>
\ No newline at end of file
</VirtualHost>
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