init eole depot

This commit is contained in:
2020-11-12 11:58:50 +01:00
parent e5724cd3d7
commit b85c6d3df7
3033 changed files with 50371 additions and 1 deletions

View File

@ -0,0 +1,9 @@
Alias /ninesurvey /var/www/html/ninesurvey/public
<Directory "/var/www/html/ninesurvey/public" >
AllowOverride All
Order Allow,Deny
Allow from All
Options Indexes FollowSymLinks MultiViews
php_admin_flag allow_url_fopen On
</Directory>

39
tmpl/ninesurvey-db.yml Normal file
View File

@ -0,0 +1,39 @@
---
%set dmode = %%getVar('ninesurvey_db_mode','non')
%if %%dmode == "externe"
dbhost: %%ninesurvey_dbserver
dbport: %%ninesurvey_dbport
dbroot: %%ninesurvey_dbuser
dbrootpwd: %%ninesurvey_dbpass
%else if %%dmode == "local"
dbhost: 127.0.0.1
%end if
dbtype: mysql
dbname: ninesurvey
dbuser: ninesurvey
dbpass: "changeme"
%set allow_hosts = %%getVar('ninesurvey_allow_hosts', '')
%if %%dmode == "local"
client_hosts: ["127.0.0.1", "localhost" %slurp
%else if %%dmode == "externe"
client_hosts: ["%%adresse_ip_eth0" %slurp
%end if
%if %%dmode != "default"
%if %%is_empty(%%allow_hosts)
]
%else
%for %%hst in %%allow_hosts
,"%%hst" %slurp
%end for
]
%end if
%end if
createscript: "/usr/share/eole/db/ninesurvey/gen/ninesurvey-create-0.sql"
%set cnt_prefix = %%getVar('container_path_reseau', '')
pwd_files:
- {file: '%%cnt_prefix/var/www/html/ninesurvey/.env.local',
pattern: 'DATABASE_PASSWORD=',
owner: 'root:www-data',
mod: '660' }

122
tmpl/ninesurvey-env.local Normal file
View File

@ -0,0 +1,122 @@
# SYMFONY
APP_ENV=PROD
APP_SECRET=%%pwdreader("","/var/www/html/ninesurvey/.key")
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
# BASIC
APP_WEBURL=%%web_url
APP_AUTH=CAS
APP_ALIAS=ninesurvey
APP_NAME=Ninesurvey
APP_CRON=1
APP_MASTERIDENTITY=%%ninesurvey_masteridentity
%if %%getVar("ninesurvey_masteridentity", 'LDAP') == "LDAP"
APP_MASTERURL=
APP_MASTERKEY=
%else
APP_MASTERURL=%%ninesurvey_urlidentity
APP_MASTERKEY=%%ninesurvey_apikeyidentity
%end if
# BDD
DATABASE_NAME=ninesurvey
DATABASE_USER=ninesurvey
DATABASE_PASSWORD=tochange
%if %%getVar("ninesurvey_db_mode", 'non') == "externe"
DATABASE_HOST=%%ninesurvey_dbserver
%else if %%getVar("ninesurvey_db_mode", 'non') == "default"
%set dbhost = %%getVar('edb_host', 'non')
%if %%dbhost == 'non' and %%mode_conteneur_actif == 'oui':
DATABASE_HOST=%%adresse_ip_mysql
%else
%if %%dbhost == 'non'
DATABASE_HOST=localhost
%else
DATABASE_HOST=localhost
%end if
%end if
%else
DATABASE_HOST=%%adresse_ip_mysql
%end if
# MAIL sendmail / smtp
%if %%getVar("ninesurvey_activer_localmail", "oui") == "oui"
MAILER_METHOD=sendmail
MAILER_URL=
%else
MAILER_METHOD=smtp
MAILER_URL=smtp://%%ninesurvey_smtphost:%%ninesurvey_smtpport?encryption=%%ninesurvey_smtpencryption&auth_mode=%%ninesurvey_smtpauthmode&username=%%ninesurvey_smtpuser&password=%%ninesurvey_smtppwd
%end if
MAILER_NOREPLY=noreply@noreply.fr
# LDAP
%if %%getVar("ninesurvey_masteridentity", 'LDAP') == "LDAP"
LDAP_MODEL=%%ninesurvey_ldaptemplate
%else
LDAP_MODEL=open
%end if
LDAP_HOST=%%adresse_ip_ldap
LDAP_PORT=%%ldap_port
LDAP_USER=%%ldap_reader
LDAP_PASSWORD=%%pwdreader("",%%ldap_reader_passfile)
LDAP_BASEDN=%%ldap_base_dn
%if %%getVar("ninesurvey_ldaptemplate", 'scribe') == "scribe"
LDAP_USERNAME=uid
LDAP_FIRSTNAME=givenname
LDAP_LASTNAME=sn
LDAP_EMAIL=mail
LDAP_FILTERGROUP=(cn=*)
LDAP_FILTERUSER=(uid=*)
%else
LDAP_USERNAME=%%ninesurvey_ldapuid
LDAP_FIRSTNAME=%%ninesurvey_ldapfirstname
LDAP_LASTNAME=%%ninesurvey_ldaplastname
LDAP_EMAIL=%%ninesurvey_ldapmail
LDAP_FILTERGROUP=%%ninesurvey_ldapfiltergroup
LDAP_FILTERUSER=%%ninesurvey_ldapfilteruser
%end if
%if %%getVar("activer_addadmin", "non") == "non"
LDAP_ADMINS='["admin"]'
%else
LDAP_ADMINS='["admin","%%uid_addadmin"]'
%end if
# CAS
CAS_HOST=%%eolesso_adresse
CAS_PORT=%%eolesso_port
CAS_PATH=%%eolesso_cas_folder
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
# Proxy
%if %%activer_proxy_client == 'oui'
PROXY_USE=1
PROXY_HOST=%%proxy_client_adresse
PROXY_PORT=%%proxy_client_port
%else
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
%end if
# Sonde statistic
%if %%getVar("activer_sondepiwik_local", 'non') == "oui"
SONDE_USE=1
SONDE_URL=/sondepiwik/envoleTrackeur.js.php
%else if %%getVar("activer_piwik", 'non') == "oui"
SONDE_USE=1
SONDE_URL=/piwik/envoleTrackeur.js.php
%else
SONDE_USE=0
SONDE_URL=
%end if

6
tmpl/ninesurvey-proxy.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Si besoin export des valeurs de HTTP_PROXY et HTTPS_PROXY
%if %%activer_proxy_client == 'oui'
export HTTP_PROXY="%%proxy_client_adresse:%%proxy_client_port"
export HTTPS_PROXY="%%proxy_client_adresse:%%proxy_client_port"
%end if

1
tmpl/ninesurvey.cron Normal file
View File

@ -0,0 +1 @@
* * * * * root /var/www/html/ninesurvey/scripts/cron.sh &>/dev/null