forked from stove/dataset
add dotclear
This commit is contained in:
parent
5c12724f33
commit
ffed310d27
7 changed files with 207 additions and 0 deletions
26
seed/dotclear/dictionaries/40_dotclear.xml
Normal file
26
seed/dotclear/dictionaries/40_dotclear.xml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<rougail version="0.10">
|
||||||
|
<services>
|
||||||
|
<service name="dotclear" target="multi-user" engine="none">
|
||||||
|
<file>/etc/dotclear/config.php</file>
|
||||||
|
<file source="dotclear.nginx.conf">/etc/nginx/default.d/dotclear.conf</file>
|
||||||
|
<file source="tmpfile-dotclear.conf">/tmpfiles.d/0dotclear.conf</file>
|
||||||
|
</service>
|
||||||
|
</services>
|
||||||
|
<variables>
|
||||||
|
<family name="dotclear" description="Dotclear">
|
||||||
|
<variable name="admin_mail_from" type="mail" description="Adresse courriel de l'administrateur" mandatory="True"/>
|
||||||
|
<variable name="dotclear_secret_key" type="password" hidden="True"/>
|
||||||
|
</family>
|
||||||
|
</variables>
|
||||||
|
<constraints>
|
||||||
|
<fill name="get_password">
|
||||||
|
<param name="server_name" type="variable">domain_name_eth0</param>
|
||||||
|
<param name="username">secret_key</param>
|
||||||
|
<param name="description">dotclear</param>
|
||||||
|
<param name="type">cleartext</param>
|
||||||
|
<param name="hide" type="variable">hide_secret</param>
|
||||||
|
<target>dotclear_secret_key</target>
|
||||||
|
</fill>
|
||||||
|
</constraints>
|
||||||
|
</rougail>
|
16
seed/dotclear/manual/image/postinstall/dotclear.sh
Normal file
16
seed/dotclear/manual/image/postinstall/dotclear.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
set -e
|
||||||
|
|
||||||
|
ORIPWD=$PWD
|
||||||
|
mkdir -p "$IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/usr/local/share"
|
||||||
|
cd "$IMAGE_NAME_RISOTTO_IMAGE_DIR_TMP/usr/local/share"
|
||||||
|
wget -q "https://download.dotclear.net/latest.tar.gz"
|
||||||
|
tar xf *tar.gz
|
||||||
|
rm -f *tar.gz
|
||||||
|
chown -R root: dotclear
|
||||||
|
cd dotclear
|
||||||
|
rmdir public
|
||||||
|
ln -s /srv/dotclear/public public
|
||||||
|
cd inc
|
||||||
|
ln -s /etc/dotclear/config.php config.php
|
||||||
|
|
||||||
|
cd $ORIPWD
|
1
seed/dotclear/manual/image/preinstall/dotclear.sh
Normal file
1
seed/dotclear/manual/image/preinstall/dotclear.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
PKG="$PKG php-pgsql php-mbstring php-xml"
|
108
seed/dotclear/templates/config.php
Normal file
108
seed/dotclear/templates/config.php
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @package Dotclear
|
||||||
|
*
|
||||||
|
* @copyright Olivier Meunier & Association Dotclear
|
||||||
|
* @copyright GPL-2.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!defined('DC_RC_PATH')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Database driver (mysql (deprecated, disabled in PHP7), mysqli, mysqlimb4 (full UTF-8), pgsql, sqlite)
|
||||||
|
define('DC_DBDRIVER', 'pgsql');
|
||||||
|
|
||||||
|
// Database hostname (usually "localhost")
|
||||||
|
define('DC_DBHOST', '%%pg_client_server_domainname');
|
||||||
|
|
||||||
|
// Database user
|
||||||
|
define('DC_DBUSER', '%%pg_client_username');
|
||||||
|
|
||||||
|
// Database password
|
||||||
|
define('DC_DBPASSWORD', '%%pg_client_password');
|
||||||
|
|
||||||
|
// Database name
|
||||||
|
define('DC_DBNAME', '%%pg_client_database');
|
||||||
|
|
||||||
|
// Tables' prefix
|
||||||
|
define('DC_DBPREFIX', 'dc_');
|
||||||
|
|
||||||
|
// Persistent database connection
|
||||||
|
define('DC_DBPERSIST', false);
|
||||||
|
|
||||||
|
// Crypt key (password storage)
|
||||||
|
define('DC_MASTER_KEY', '%%dotclear_secret_key');
|
||||||
|
|
||||||
|
// Admin URL. You need to set it for some features.
|
||||||
|
%set %%location = %%revprox_client_external_domainnames[0].revprox_client_location
|
||||||
|
define('DC_ADMIN_URL', 'https://%%revprox_client_external_domainnames[0]%%{location}admin');
|
||||||
|
|
||||||
|
// Admin mail from address. For password recovery and such.
|
||||||
|
define('DC_ADMIN_MAILFROM', '%%admin_mail_from');
|
||||||
|
|
||||||
|
// Cookie's name
|
||||||
|
define('DC_SESSION_NAME', 'dcxd');
|
||||||
|
|
||||||
|
// Session TTL
|
||||||
|
//define('DC_SESSION_TTL','120 seconds');
|
||||||
|
|
||||||
|
// Plugins root
|
||||||
|
define('DC_PLUGINS_ROOT', '/srv/dotclear/plugins');
|
||||||
|
|
||||||
|
// Template cache directory
|
||||||
|
//>GNUNUX
|
||||||
|
//define('DC_TPL_CACHE', path::real(__DIR__ . '/..') . '/cache');
|
||||||
|
define('DC_TPL_CACHE', '/srv/dotclear/cache');
|
||||||
|
//<GNUNUX
|
||||||
|
|
||||||
|
// Var directory
|
||||||
|
define('DC_VAR', '/srv/dotclear/var');
|
||||||
|
|
||||||
|
// Cryptographic algorithm
|
||||||
|
define('DC_CRYPT_ALGO', 'sha512');
|
||||||
|
|
||||||
|
// Vendor name
|
||||||
|
//define('DC_VENDOR_NAME', 'Dotclear');
|
||||||
|
|
||||||
|
// Do not check for update
|
||||||
|
//define('DC_NOT_UPDATE', false);
|
||||||
|
//>GNUNUX
|
||||||
|
define('DC_NOT_UPDATE', false);
|
||||||
|
//<GNUNUX
|
||||||
|
|
||||||
|
// Update URL
|
||||||
|
//define('DC_UPDATE_URL','https://download.dotclear.org/versions.xml');
|
||||||
|
|
||||||
|
// Update channel (stable, unstable, testing)
|
||||||
|
//define('DC_UPDATE_VERSION', 'stable');
|
||||||
|
|
||||||
|
// Proxy config
|
||||||
|
//define('HTTP_PROXY_HOST','127.0.0.1');
|
||||||
|
//define('HTTP_PROXY_PORT','8080');
|
||||||
|
|
||||||
|
// Reverse Proxy
|
||||||
|
//define('DC_REVERSE_PROXY',false);
|
||||||
|
//>GNUNUX
|
||||||
|
define('DC_REVERSE_PROXY',true);
|
||||||
|
//<GNUNUX
|
||||||
|
|
||||||
|
// Show hidden media dirs
|
||||||
|
//define('DC_SHOW_HIDDEN_DIRS', false);
|
||||||
|
|
||||||
|
// Store update checking
|
||||||
|
//define('DC_STORE_NOT_UPDATE', false);
|
||||||
|
|
||||||
|
// If you have PATH_INFO issue, uncomment following lines
|
||||||
|
//if (!isset($_SERVER['ORIG_PATH_INFO'])) {
|
||||||
|
// $_SERVER['ORIG_PATH_INFO'] = '';
|
||||||
|
//}
|
||||||
|
//$_SERVER['PATH_INFO'] = $_SERVER['ORIG_PATH_INFO'];
|
||||||
|
|
||||||
|
// If you have mail problems, uncomment following lines and adapt it to your hosting configuration
|
||||||
|
// For more information about this setting, please refer to http://doc.dotclear.net/2.0/admin/install/custom-sendmail
|
||||||
|
//function _mail($to, $subject, $message, $headers)
|
||||||
|
//{
|
||||||
|
// socketMail::$smtp_relay = 'my.smtp.relay.org';
|
||||||
|
// socketMail::mail($to, $subject, $message, $headers);
|
||||||
|
//}
|
34
seed/dotclear/templates/dotclear.nginx.conf
Normal file
34
seed/dotclear/templates/dotclear.nginx.conf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# To allow POST on static pages
|
||||||
|
error_page 405 =200 $uri;
|
||||||
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
add_header X-XSS-Protection "1; mode=block";
|
||||||
|
add_header X-Robots-Tag none;
|
||||||
|
add_header X-Download-Options noopen;
|
||||||
|
add_header X-Permitted-Cross-Domain-Policies none;
|
||||||
|
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains;';
|
||||||
|
add_header Referrer-Policy no-referrer always;
|
||||||
|
|
||||||
|
%set %%locations = []
|
||||||
|
%for %%revprox in %%revprox_client_external_domainnames
|
||||||
|
%set %%location = %%revprox.revprox_client_location
|
||||||
|
%if %%location in %%locations
|
||||||
|
%continue
|
||||||
|
%end if
|
||||||
|
%%locations.append(%%location)
|
||||||
|
location %%location {
|
||||||
|
%if %%location == '/'
|
||||||
|
root %slurp
|
||||||
|
%else
|
||||||
|
alias %slurp
|
||||||
|
%end if
|
||||||
|
/usr/local/share/dotclear/;
|
||||||
|
index index.php;
|
||||||
|
location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
|
||||||
|
fastcgi_pass php-fpm;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
%end for
|
18
seed/dotclear/templates/dotclear.service
Normal file
18
seed/dotclear/templates/dotclear.service
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Dotclear management
|
||||||
|
After=risotto.target
|
||||||
|
Before=nginx.service php-fpm.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/cp -f /usr/local/share/dotclear/var/.htaccess /srv/dotclear/var/
|
||||||
|
ExecStart=/usr/bin/cp -f /usr/local/share/dotclear/cache/.htaccess /srv/dotclear/cache/
|
||||||
|
ExecStart=/usr/bin/cp -f /usr/local/share/dotclear/plugins/.htaccess /srv/dotclear/plugins/
|
||||||
|
ExecStart=/usr/bin/rm -rf /srv/dotclear/plugins/*
|
||||||
|
ExecStart=/bin/bash -c '/usr/bin/cp -fr /usr/local/share/dotclear/plugins/* /srv/dotclear/plugins/'
|
||||||
|
|
||||||
|
User=nginx
|
||||||
|
Group=nginx
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
4
seed/dotclear/templates/tmpfile-dotclear.conf
Normal file
4
seed/dotclear/templates/tmpfile-dotclear.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
d /srv/dotclear/cache 770 root nginx - -
|
||||||
|
d /srv/dotclear/public 770 root nginx - -
|
||||||
|
d /srv/dotclear/var 770 root nginx - -
|
||||||
|
d /srv/dotclear/plugins 770 root nginx - -
|
Loading…
Reference in a new issue