first commit
This commit is contained in:
10
tmpl/ninenote-apache.conf
Normal file
10
tmpl/ninenote-apache.conf
Normal file
@ -0,0 +1,10 @@
|
||||
Alias /ninenote /var/www/html/ninenote/public
|
||||
|
||||
<Directory "/var/www/html/ninenote/public" >
|
||||
AllowOverride All
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
php_admin_flag allow_url_fopen On
|
||||
</Directory>
|
||||
|
39
tmpl/ninenote-db.yml
Normal file
39
tmpl/ninenote-db.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
%set dmode = %%getVar('ninenote_db_mode','non')
|
||||
%if %%dmode == "externe"
|
||||
dbhost: %%ninenote_dbserver
|
||||
dbport: %%ninenote_dbport
|
||||
dbroot: %%ninenote_dbuser
|
||||
dbrootpwd: %%ninenote_dbpass
|
||||
%else if %%dmode == "local"
|
||||
dbhost: 127.0.0.1
|
||||
%end if
|
||||
dbtype: mysql
|
||||
dbname: ninenote
|
||||
dbuser: ninenote
|
||||
dbpass: "changeme"
|
||||
%set allow_hosts = %%getVar('ninenote_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/ninenote/gen/ninenote-create-0.sql"
|
||||
|
||||
%set cnt_prefix = %%getVar('container_path_reseau', '')
|
||||
pwd_files:
|
||||
- {file: '%%cnt_prefix/var/www/html/ninenote/.env.local',
|
||||
pattern: 'DATABASE_PASSWORD=',
|
||||
owner: 'root:www-data',
|
||||
mod: '660' }
|
131
tmpl/ninenote-env.local
Executable file
131
tmpl/ninenote-env.local
Executable file
@ -0,0 +1,131 @@
|
||||
# SYMFONY
|
||||
APP_ENV=PROD
|
||||
%set keyfile = %%getVar('container_path_web','') + '/var/www/html/ninenote/.key'
|
||||
APP_SECRET=%%pwdreader("",%%keyfile)
|
||||
#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=ninenote
|
||||
APP_NAME=Ninenote
|
||||
APP_CRON=1
|
||||
APP_MASTERIDENTITY=%%ninenote_masteridentity
|
||||
%if %%getVar("ninenote_masteridentity", 'LDAP') == "LDAP"
|
||||
APP_MASTERURL=
|
||||
APP_MASTERKEY=
|
||||
%else
|
||||
APP_MASTERURL=%%ninenote_urlidentity
|
||||
APP_MASTERKEY=%%ninenote_apikeyidentity
|
||||
%end if
|
||||
|
||||
|
||||
# BDD
|
||||
DATABASE_NAME=ninenote
|
||||
DATABASE_USER=ninenote
|
||||
DATABASE_PASSWORD=tochange
|
||||
%if %%getVar("ninenote_db_mode", 'non') == "externe"
|
||||
DATABASE_HOST=%%ninenote_dbserver
|
||||
%else if %%getVar("ninenote_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("ninenote_activer_localmail", "oui") == "oui"
|
||||
MAILER_METHOD=sendmail
|
||||
MAILER_URL=
|
||||
%else
|
||||
MAILER_METHOD=smtp
|
||||
MAILER_URL=smtp://%%ninenote_smtphost:%%ninenote_smtpport?encryption=%%ninenote_smtpencryption&auth_mode=%%ninenote_smtpauthmode&username=%%ninenote_smtpuser&password=%%ninenote_smtppwd
|
||||
%end if
|
||||
MAILER_NOREPLY=noreply@noreply.fr
|
||||
|
||||
|
||||
# LDAP
|
||||
%if %%getVar("ninenote_masteridentity", 'LDAP') == "LDAP"
|
||||
LDAP_MODEL=%%ninenote_ldaptemplate
|
||||
%else
|
||||
LDAP_MODEL=open
|
||||
%end if
|
||||
LDAP_HOST=%%adresse_ip_ldap
|
||||
LDAP_PORT=%%ldap_port
|
||||
%if %%getVar("ldap_tls","non") == "oui"
|
||||
LDAP_TLS=1
|
||||
%else
|
||||
LDAP_TLS=0
|
||||
%end if
|
||||
LDAP_USER=%%ldap_reader
|
||||
LDAP_PASSWORD=%%pwdreader("",%%ldap_reader_passfile)
|
||||
LDAP_BASEDN=%%ldap_base_dn
|
||||
%if %%getVar("ninenote_ldaptemplate", 'scribe') == "scribe"
|
||||
LDAP_USERNAME=uid
|
||||
LDAP_FIRSTNAME=givenname
|
||||
LDAP_LASTNAME=sn
|
||||
LDAP_EMAIL=mail
|
||||
LDAP_FILTERGROUP=(&(ObjectClass=posixGroup)(cn=*))
|
||||
LDAP_FILTERUSER=(&(ObjectClass=person)(uid=*))
|
||||
%else
|
||||
LDAP_USERNAME=%%ninenote_ldapuid
|
||||
LDAP_FIRSTNAME=%%ninenote_ldapfirstname
|
||||
LDAP_LASTNAME=%%ninenote_ldaplastname
|
||||
LDAP_EMAIL=%%ninenote_ldapmail
|
||||
LDAP_FILTERGROUP=%%ninenote_ldapfiltergroup
|
||||
LDAP_FILTERUSER=%%ninenote_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 if %%getVar("activer_sondednma", 'non') == "oui"
|
||||
SONDE_USE=1
|
||||
SONDE_URL=/sondepiwik/envoleTrackeur.js.php
|
||||
%else
|
||||
SONDE_USE=0
|
||||
SONDE_URL=
|
||||
%end if
|
2
tmpl/ninenote.cron
Normal file
2
tmpl/ninenote.cron
Normal file
@ -0,0 +1,2 @@
|
||||
* * * * * root /var/www/html/ninenote/scripts/cron.sh &>/dev/null
|
||||
* * * * * root /var/www/html/ninenote/scripts/websocket.sh restartifdown &>/dev/null
|
11
tmpl/ninenote.service
Normal file
11
tmpl/ninenote.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Ninenote websocket server
|
||||
After=local-fs.target network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/var/www/html/ninenote/bin/console app:Websocket --name ninenote
|
||||
Restart=on-watchdog
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user