Commit b30122ef authored by Alain Takoudjou's avatar Alain Takoudjou

Add drupal software release

parent cafcac83
[template-drupal-instance]
filename = drupal-instance.cfg.in
md5sum = 93e5694836b85ef82de4e90a07c5127d
[apache-php-configuration]
enable-php8 = !py!True
document-root = ${:default-document-root}/docroot
[drush-bin]
recipe = slapos.cookbook:wrapper
command-line =
${php-bin:wrapper-path} ${directory:www}/vendor/drush/drush/drush
wrapper-path = ${directory:bin}/drush
[drupal-env]
recipe = collective.recipe.template
input = inline:
export DRUPAL_PROFILE=${instance-parameter:site-profile}
export LOCALE=${instance-parameter:site-locale}
export DB_URL=${mariadb-urlparse:url}
export SITE_NAME="${instance-parameter:site-name}"
export SITE_MAIL=${instance-parameter:site-mail}
export ACCOUNT_NAME="${instance-parameter:account-name}"
export ACCOUNT_MAIL=${instance-parameter:account-mail}
export ACCOUNT_PASS=${drupal-admin-passwd:passwd}
export PATH={{ mariadb_location }}/bin:$PATH
output = ${directory:etc}/site.env
mode = 600
[drupal-site-install]
output = ${directory:scripts}/drupal-install
recipe = collective.recipe.template
input = inline:#!/bin/sh
set -e
INSTALL_FILE=${directory:var}/.install-done
if [ -s "$INSTALL_FILE" ]; then
echo "Drupal is installed."
exit 0;
fi
. ${drupal-env:output}
${drush-bin:wrapper-path} site:install $DRUPAL_PROFILE \
--locale=$LOCALE \
--db-url=$DB_URL \
--site-name=$SITE_NAME \
--site-mail=$SITE_MAIL \
--account-name=$ACCOUNT_NAME \
--account-mail=$ACCOUNT_MAIL \
--account-pass=$ACCOUNT_PASS \
--verbose --yes
echo "done" > $INSTALL_FILE
mode = 744
[drupal-admin-passwd]
recipe = slapos.cookbook:generate.password
storage-path = ${directory:etc}/.admin_pwd
[instance-parameter]
site-profile = ${slap-parameter:instance.site-profile}
site-locale = ${slap-parameter:instance.site-locate}
site-name = ${slap-parameter:instance.site-name}
site-mail = ${slap-parameter:instance.site-mail}
account-name = ${slap-parameter:instance.account-name}
account-mail = ${slap-parameter:instance.account-mail}
[slap-parameter]
instance.site-profile = standard
instance.site-locate = fr
instance.site-name = Drupal SlapOS
instance.site-mail = admin@example.com
instance.account-name = admin
instance.account-mail = admin@example.com
[buildout]
extends =
../../component/redis/buildout.cfg
../../component/nodejs/buildout.cfg
../../component/python-2.7/buildout.cfg
../../component/pytest/buildout.cfg
../../component/java-jdk/buildout.cfg
../../stack/lamp/buildout.cfg
buildout.hash.cfg
parts +=
composer-setup
install-drupal
[nodejs]
<= nodejs-8.9.4
[apache-php]
<= apache-php8.1
[python-interpreter]
eggs +=
${pytest:eggs}
[drupal-download]
<= template-download-base
url = ${:_profile_base_location_}/${:filename}
[custom-application-deployment]
path = ${template-drupal-instance:output}
part-list = drupal-site-install
db-name = drupal_db
db-user = drupal
#default-frontend = False
[composer]
recipe = slapos.recipe.build:download
url = https://getcomposer.org/installer
filename = composer-setup.php
[composer-php.ini]
# A minimal php.ini that will be used to install druplal
recipe = collective.recipe.template
input =
inline:[PHP]
engine = On
safe_mode = Off
expose_php = Off
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
display_errors = On
display_startup_errors = Off
log_errors = On
zend_extension=opcache
extension=apcu
extension=redis
extension=imagick
apc.enabled=1
[opcache]
opcache.enable=1
opcache.enable_cli=1
output = ${composer:location}/php.ini
[composer-setup]
recipe = plone.recipe.command
command =
INSTAL_DIR=${composer:location}/bin
PATH=${apache-php:location}/bin:$PATH
mkdir -p $INSTAL_DIR
php ${composer:location}/composer-setup.php --install-dir=$INSTAL_DIR --filename=composer
stop-on-error = true
update-command = ${:command}
[composer-bin]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
export PATH=${apache-php:location}/bin:$PATH
php -c ${composer-php.ini:output} ${composer:location}/bin/composer "$@"
output = ${composer:location}/composer
mode = 755
# Download drupal composer
[application]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
repository = https://lab.nexedi.com/alain.takoudjou/drupal-composer.git
branch = master
[install-drupal]
recipe = slapos.recipe.cmmi
path = ${application:location}
configure-command = true
# ${composer-bin:output} config vendor-dir docroot/vendor
make-targets =
make-options =
make-binary =
${composer-bin:output} install
${composer-bin:output} update
environment =
COMPOSER_HOME=@@LOCATION@@
PATH=${apache-php:location}/bin:%(PATH)s
[template-drupal-instance]
recipe = slapos.recipe.template:jinja2
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance-drupal.cfg
extensions = jinja2.ext.do
context =
key php_location apache-php:location
key mariadb_location mariadb:location
key nodejs_location nodejs:location
[template]
recipe =
context =
[perl-DBD-mariadb]
recipe =
perl-PATH =
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