Commit 990ed912 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

moodle: Initial commit

parent ee9d4895
<VirtualHost *:{{ parameter_dict['port'] }}>
ServerAdmin admin@example.com
DocumentRoot {{ parameter_dict['document-root'] }}
SetEnvIf Origin "^http(s)?://(.+\.)?(app\.officejs\.com)$" ORIGIN_DOMAIN=$0
Header always set Access-Control-Allow-Origin "%{ORIGIN_DOMAIN}e" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Credentials "true" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Methods "PROPFIND, PROPPATCH, COPY, MOVE, DELETE, MKCOL, LOCK, UNLOCK, PUT, GETLIB, VERSION-CONTROL, CHECKIN, CHECKOUT, UNCHECKOUT, REPORT, UPDATE, CANCELUPLOAD, HEAD, OPTIONS, GET, POST" env=ORIGIN_DOMAIN
Header always set Access-Control-Allow-Headers "Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Authorization" env=ORIGIN_DOMAIN
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
<Directory {{ parameter_dict['document-root'] }}>
Options +FollowSymlinks
AllowOverride All
Require all granted
SetEnv HOME {{ parameter_dict['document-root'] }}
SetEnv HTTP_HOME {{ parameter_dict['document-root'] }}
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
ErrorLog "{{ parameter_dict['log-dir'] }}/moodle-error.log"
CustomLog "{{ parameter_dict['log-dir'] }}/moodle-access.log" combined
</VirtualHost>
# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax.
# The only allowed lines here are (regexes):
# - "^#" comments, copied verbatim
# - "^[" section beginings, copied verbatim
# - lines containing an "=" sign which must fit in the following categorie.
# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file
# Copied verbatim.
# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported
# by the re-generation script.
# Re-generated.
# - other lines are copied verbatim
# Substitution (${...:...}), extension ([buildout] extends = ...) and
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-moodle-config-dist]
filename = config-dist.php.in
md5sum = c4389ad27b1549377e6a2fe870322cfb
[template-apache-httpd]
filename = apache-httpd.conf.in
md5sum = 7e3d2cec363344bb6f3b0efa4e574941
[template-moodle-instance]
filename = moodle-instance.cfg.in
md5sum = 48c387d50bc5097f6b87604675047ec8
This diff is collapsed.
[moodle-directory]
recipe = slapos.cookbook:mkdirectory
data = ${directory:srv}/data
[instance-parameter]
moodle = ${:document-root}
admin-user = admin
admin-password = admin
trusted-domain-list =
[${apache-php-configuration:ip}]:${apache-php-configuration:port}
${slap-parameter:instance.trusted-domain-1}
${slap-parameter:instance.trusted-domain-2}
${slap-parameter:instance.trusted-domain-3}
custom-url = ${slap-parameter:instance.custom-url}
trusted-proxy-list = ${slap-parameter:instance.trusted-proxy-list}
cli-url = ${slap-parameter:instance.cli-url}
data-dir = ${moodle-directory:data}
#php.ini parameters
php.memory_limit = 512M
php.date.timezone = Europe/Paris
php.upload_max_filesize = 10240M
php.post_max_size = 10240M
php.session.cookie_secure = True
php.max_execution_time = 1800
php.max_input_time = 3600
php.output_buffering = 'Off'
php.max_file_uploads = 100
#SMTP settings
mail.from = ${slap-parameter:instance.mail-from}
mail.domain = ${slap-parameter:instance.mail-domain}
mail.smtpauthtype = ${slap-parameter:instance.mail-smtpauthtype}
mail.smtpauth = ${slap-parameter:instance.mail-smtpauth}
mail.smtpport = ${slap-parameter:instance.mail-smtpport}
mail.smtphost = ${slap-parameter:instance.mail-smtphost}
mail.smtpname = ${slap-parameter:instance.mail-smtpname}
mail.smtppassword = ${slap-parameter:instance.mail-smtppassword}
# Instance configuration
collabora-url = ${slap-parameter:instance.collabora-url}
stun-server = ${slap-parameter:instance.stun-server}
turn-server = ${slap-parameter:instance.turn-server}
turn-secret = ${slap-parameter:instance.turn-secret}
[moodle-config-dist.php]
recipe = slapos.recipe.template:jinja2
template = {{ moodle_config_dist }}
rendered = ${instance-parameter:document-root}/config.php
context =
section parameter_dict instance-parameter
key frontend_url request-frontend:connection-secure_access
mode = 744
depends =
${moodle-apache-httpd:recipe}
${moodle-cron:recipe}
[moodle-apache-httpd]
recipe = slapos.recipe.template:jinja2
template = {{ moodle_apache_httpd }}
rendered = ${directory:apache.d}/moodle.conf
context =
section parameter_dict apache-php-configuration
mode = 744
[moodle-cron]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = moodle
frequency = */5 * * * *
command = ${php-bin:wrapper-path} -f ${instance-parameter:moodle}/admin/cli/cron.php
[slap-parameter]
instance.mail-from = moodle
instance.mail-domain = moodle@example.com
instance.mail-smtpauthtype = LOGIN
instance.mail-smtpauth = 1
instance.mail-smtpport = 587
instance.mail-smtphost =
instance.mail-smtpname =
instance.mail-smtppassword =
instance.collabora-url = https://moodle.host.vifib.net/
instance.stun-server = turn.vifib.com:5349
instance.turn-server =
instance.turn-secret =
instance.cli-url = ${apache-php-configuration:url}
instance.trusted-domain-1 =
instance.trusted-domain-2 =
instance.trusted-domain-3 =
instance.trusted-proxy-list =
instance.custom-url =
[php-bin]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/php
command-line = ${instance-parameter:php-bin} -c ${php.ini-conf:rendered}
[buildout]
extends =
buildout.hash.cfg
../../stack/lamp/buildout.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = https://download.moodle.org/download.php/direct/stable310/moodle-latest-310.tgz
md5sum = 73e2c9d37abcc18da12e52990f9b6452
#If provided tarball does not contain top directory, option shall be changed to false
strip-top-level-dir = true
[moodle-download-base]
recipe = hexagonit.recipe.download
ignore-existing = true
download-only = true
url = ${:_profile_base_location_}/${:filename}
mode = 0644
[template-moodle-config-dist]
<= moodle-download-base
[template-apache-httpd]
<= moodle-download-base
[custom-application-deployment]
path = ${template-moodle-instance:rendered}
part-list = moodle-config-dist.php
[template-moodle-instance]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}
rendered = ${buildout:directory}/instance-moodle.cfg
extensions = jinja2.ext.do
context =
key php_location apache-php:location
raw moodle_config_dist ${template-moodle-config-dist:location}/${template-moodle-config-dist:filename}
raw moodle_apache_httpd ${template-apache-httpd:location}/${template-apache-httpd:filename}
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