Compare commits

..

1 Commits
master ... eole

Author SHA1 Message Date
afornerot 4de1c5457f composer & migration ninegate 2023-09-08 10:15:46 +02:00
3652 changed files with 195426 additions and 58356 deletions

176
.env
View File

@ -1,176 +0,0 @@
# Symfony
APP_ENV=prod
APP_SECRET=changeme
APP_SESSIONTIME=1440
# Messenger
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# Database
DATABASE_URL="postgresql://symfony:changeme@postgres:5432/app?serverVersion=13&charset=utf8"
# Redis Sentiel Session
REDIS_HOST='redis-sentinel'
REDIS_PORT=26379 # 6379 | 26379
REDIS_SERVICE=redismaster # master sentinel name
# Mailer
MAILER_METHOD=smtp
MAILER_DSN=smtp://mailer:1025
MAILER_NOREPLY=noreply@noreply.fr
# Basic
APP_WEBURL=localhost:8080
APP_MASTERIDENTITY=SQL # SQL | SSO | LDAP
APP_AUTH=SQL # SQL | CAS | LDAP | OPENID | à faire SAML
APP_ALIAS=/
APP_NAME=Nineskeletor
APP_MODEREGISTRATION= # null | BYADMIN | BYUSER
APP_ADMINS='["admin"]'
# Structure Organisationnelle
APP_NIVEAUUPDATABLE=0 # Quel degres de niveau est modifiable par les utilisateurs seule les admin et modo via console peuvent outre passer ce param
APP_NIVEAU01LABEL="Niveau 01"
APP_NIVEAU01LABELS="Niveaux 01"
APP_NIVEAU02USE=1
APP_NIVEAU02LABEL="Niveau 02"
APP_NIVEAU02LABELS="Niveaux 02"
APP_NIVEAU02MANDATORY='[""]'
APP_NIVEAU03USE=1
APP_NIVEAU03LABEL="Niveau 03"
APP_NIVEAU03LABELS="Niveaux 03"
APP_NIVEAU03MANDATORY='[""]'
APP_NIVEAU04USE=0
APP_NIVEAU04LABEL="Niveau 04"
APP_NIVEAU04LABELS="Niveaux 04"
APP_NIVEAU04MANDATORY='[""]'
APP_GROUPUSE=1
APP_GROUPSUBMITER='["ALL"]'
APP_ANNUSCOPEADMIN=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMODO=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMASTER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEMANAGER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_ANNUSCOPEUSER=ALL # ALL or number of niveau view : 1||2||3||4 or 0 desactivé
APP_USERVIEWISVISIBLE=1 # Profil user with isvisible field
# Synchronisation
APP_SYNCHRO= # Synchronisation null | LDAP2NINE | NINE2LDAP | NINE2NINE
APP_SYNDCHROPURGENIVEAU01=1 # Purger les niveau01s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU02=1 # Purger les niveau02s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU03=1 # Purger les niveau03s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU04=1 # Purger les niveau04s obsolète en cas de synchronisation
APP_SYNDCHROPURGEGROUP=1 # Purger les groups obsolète en cas de synchronisation
APP_SYNDCHROPURGEUSER=1 # Purger les users obsolète en cas de synchronisation
# LDAP
LDAP_HOST=openldap # host du serveur ldap
LDAP_PORT=389 # port du serveur ldap
LDAP_USETLS=0 # connection TLS 0/1
LDAP_USERWRITER=0 # LDAP_USER compte writer ? 0/1
LDAP_USER= # DN compte access ldap admin or reader
LDAP_PASSWORD= # Password compte access ldap admin or reader
LDAP_BASEDN= # Base DN ex:dc=nine,dc=fr
LDAP_BASEORGANISATION= # Base Organisation ex:ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU01= # Base Niveau01 ex:ou=niveau01,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU02= # Base Niveau02 ex:ou=niveau02,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU03= # Base Niveau03 ex:ou=niveau03,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASENIVEAU04= # Base Niveau04 ex:ou=niveau04,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASEGROUP= # Base Group ex:ou=groups,ou=nineskeletor,dc=nine,dc=fr
LDAP_BASEUSER= # Base User ex:ou=users,ou=nineskeletor,dc=nine,dc=fr
LDAP_USERNAME=uid # Attribut id d'un user
LDAP_FIRSTNAME=givenname # Attribut firstname d'un user
LDAP_LASTNAME=sn # Attribut lastname d'un user
LDAP_EMAIL=mail # Attribut email d'un user
LDAP_AVATAR= # Attribut avatar d'un user
LDAP_MEMBEROF=memberof # Attribut memberof d'un user
LDAP_GROUPGID=gidnumber # Attribut gid d'un groupe
LDAP_GROUPNAME=cn # Attribut name d'un groupe
LDAP_GROUPMEMBER=memberuid # Attribut stockant les membres d'un groupe
LDAP_GROUPMEMBERISDN=0 # LDAP_GROUPMEMBER stocke un uid ou un dn ? 0/1
LDAP_FILTERGROUP=(cn=*) # requete ldap pour rechercher les groupes
LDAP_FILTERUSER=(uid=*) # requete ldap pour rechercher les users
LDAP_AUTOSUBMIT=1 # if APP_AUTH = LDAP autocréer les users non existant
LDAP_AUTOUPDATE=1 # if APP_AUTH = LDAP automodifier les users existant
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
CAS_AVATAR=
CAS_NIVEAU01=
CAS_GROUP=
CAS_AUTOSUBMIT=1 # if APP_AUTH = CAS autocréer les users non existant
CAS_AUTOUPDATE=1 # if APP_AUTH = CAS automodifier les users existant
# If APP_AUTH = OPENID
OAUTH_CLIENTID=nineskeletor
OAUTH_CLIENTSECRET="changeme"
OAUTH_LOGINURL=http://localhost:7080/oauth2/auth
OAUTH_LOGOUTURL=http://localhost:7080/oauth2/sessions/logout
OAUTH_TOKENURL=http://hydra:4444/oauth2/token
OAUTH_USERINFO=http://hydra:4444/userinfo
OAUTH_USERNAME=username
OAUTH_EMAIL=email
OAUTH_LASTNAME=lastname
OAUTH_FIRSTNAME=firstname
OAUTH_AVATAR=
OAUTH_NIVEAU01=
OAUTH_GROUP=
OAUTH_AUTOSUBMIT=0 # if APP_AUTH = OPENID autocréer les users non existant
OAUTH_AUTOUPDATE=1 # if APP_AUTH = OPENID automodifier les users existant
# IF APP_SYNCHRO=NINE2NINE
NINE_URL=
NINE_SECRET=
# If APP_MODEREGISTRATION != NULL
APP_MODEREGISTRATIONTERM=6 # Temps en heure de la durée de validité de l'inscription
# Proxy
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
# Audit
AUDIT_USE=0
# Sonde statistic
SONDE_USE=0
SONDE_URL=
# Mercure
MERCURE_URL=http://mercure/.well-known/mercure
MERCURE_PUBLIC_URL=http://localhost:8081/.well-known/mercure
MERCURE_JWT_SECRET="!changeme!changeme!changeme!changeme!changeme!changeme!"
# Minio
MINIO_URL=http://nginx:9000
MINIO_KEY=minio
MINIO_SECRET=changeme
MINIO_BUCKET=nine
MINIO_ROOT=
MINIO_PATH_STYLE=1
MINIO_SECURE=0
# Hydra apps
HYDRA_LOGINCHALLENGE="http://hydra:4445/oauth2/auth/requests/login?login_challenge="
HYDRA_LOGINCHALLENGEACCEPT="http://hydra:4445/oauth2/auth/requests/login/accept?login_challenge="
HYDRA_CONSENTCHALLENGE="http://hydra:4445/oauth2/auth/requests/consent?consent_challenge="
HYDRA_CONSENTCHALLENGEACCEPT="http://hydra:4445/oauth2/auth/requests/consent/accept?consent_challenge="
# Lock
LOCK_DSN="postgresql://symfony:changeme@postgres:5432/app?serverVersion=13&charset=utf8"
# Sentry
SENTRY_DSN=

View File

@ -1,174 +0,0 @@
# Symfony
APP_ENV=dev
APP_SECRET=changeme
APP_SESSIONTIME=1440
# Messenger
MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# Database
DATABASE_URL="postgresql://symfony:ChangeMe@127.0.0.1:5432/ninegate?serverVersion=13&charset=utf8"
# Redis Session
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
# Mailer
MAILER_METHOD=smtp
MAILER_DSN=smtp://127.0.0.1:1025
MAILER_NOREPLY=noreply@noreply.fr
# Basic
APP_WEBURL=127.0.0.1:8000
APP_MASTERIDENTITY=SQL # SQL | SSO | LDAP
APP_AUTH=OPENID # SQL | CAS| LDAP | OPENID | à faire SAML
APP_ALIAS=/
APP_NAME=ninegate
APP_MODEREGISTRATION=BYADMIN # null | BYADMIN | BYUSER
APP_ADMINS='["admin"]'
# Structure Organisationnelle
APP_NIVEAUUPDATABLE=4
APP_NIVEAU01LABEL="Niveau 01"
APP_NIVEAU01LABELS="Niveaux 01"
APP_NIVEAU02USE=1
APP_NIVEAU02LABEL="Niveau 02"
APP_NIVEAU02LABELS="Niveaux 02"
APP_NIVEAU02MANDATORY='[""]'
APP_NIVEAU03USE=1
APP_NIVEAU03LABEL="Niveau 03"
APP_NIVEAU03LABELS="Niveaux 03"
APP_NIVEAU03MANDATORY='[""]'
APP_NIVEAU04USE=1
APP_NIVEAU04LABEL="Niveau 04"
APP_NIVEAU04LABELS="Niveaux 04"
APP_NIVEAU04MANDATORY='[""]'
APP_GROUPUSE=1
APP_GROUPSUBMITER='["ROLE_ADMIN"]'
APP_ANNUSCOPEADMIN=1
APP_ANNUSCOPEMODO=1
APP_ANNUSCOPEMASTER=2
APP_ANNUSCOPEMANAGER=3
APP_ANNUSCOPEUSER=3
APP_USERVIEWISVISIBLE=1
# Synchronisation
APP_SYNCHRO=NINE2LDAP # Synchronisation null | LDAP2NINE | NINE2LDAP | NINE2NINE
APP_SYNDCHROPURGENIVEAU01=1 # Purger les niveau01s obsolète en cas de synchronisation
APP_SYNDCHROPURGENIVEAU02=1 # Purger les niveau02s obsolète en cas de synchronisation
APP_SYNDCHROPURGEGROUP=1 # Purger les groups obsolète en cas de synchronisation
APP_SYNDCHROPURGEUSER=1 # Purger les users obsolète en cas de synchronisation
# LDAP
LDAP_HOST=127.0.0.1
LDAP_PORT=389
LDAP_USETLS=0
LDAP_USERWRITER=1
LDAP_USER="cn=admin,dc=nine,dc=fr"
LDAP_PASSWORD=changeme
LDAP_BASEDN="dc=nine,dc=fr"
LDAP_BASEORGANISATION="ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU01="ou=niveau01,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU02="ou=niveau02,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU03="ou=niveau03,ou=ninegate,dc=nine,dc=fr"
LDAP_BASENIVEAU04="ou=niveau04,ou=ninegate,dc=nine,dc=fr"
LDAP_BASEGROUP="ou=groups,ou=ninegate,dc=nine,dc=fr"
LDAP_BASEUSER="ou=users,ou=ninegate,dc=nine,dc=fr"
LDAP_USERNAME=uid # Attribut id d'un user
LDAP_FIRSTNAME=givenname # Attribut firstname d'un user
LDAP_LASTNAME=sn # Attribut lastname d'un user
LDAP_EMAIL=mail # Attribut email d'un user
LDAP_AVATAR= # Attribut avatar d'un user
LDAP_MEMBEROF=memberof # Attribut memberof d'un user
LDAP_GROUPGID=gidnumber # Attribut gid d'un groupe
LDAP_GROUPNAME=cn # Attribut name d'un groupe
LDAP_GROUPMEMBER=memberuid # Attribut stockant les membres d'un groupe
LDAP_GROUPMEMBERISDN=0 # LDAP_GROUPMEMBER stocke un uid ou un dn ? 0/1
LDAP_FILTERGROUP=(cn=*) # requete ldap pour rechercher les groupes
LDAP_FILTERUSER=(uid=*) # requete ldap pour rechercher les users
LDAP_AUTOSUBMIT=1 # if APP_AUTH = LDAP autocréer les users non existant
LDAP_AUTOUPDATE=1 # if APP_AUTH = LDAP automodifier les users existant
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
CAS_AVATAR=
CAS_NIVEAU01=
CAS_GROUP=
CAS_AUTOSUBMIT=1 # if APP_AUTH = CAS autocréer les users non existant
CAS_AUTOUPDATE=1 # if APP_AUTH = CAS automodifier les users existant
# If APP_AUTH = OPENID
OAUTH_CLIENTID=ninegate
OAUTH_CLIENTSECRET="changeme"
OAUTH_LOGINURL=http://127.0.0.1:7080/oauth2/auth
OAUTH_LOGOUTURL=http://127.0.0.1:7080/oauth2/sessions/logout
OAUTH_TOKENURL=http://127.0.0.1:7080/oauth2/token
OAUTH_USERINFO=http://127.0.0.1:7080/userinfo
OAUTH_USERNAME=username
OAUTH_EMAIL=email
OAUTH_LASTNAME=lastname
OAUTH_FIRSTNAME=firstname
OAUTH_AVATAR=
OAUTH_NIVEAU01=
OAUTH_GROUP=
OAUTH_AUTOSUBMIT=0 # if APP_AUTH = OPENID autocréer les users non existant
OAUTH_AUTOUPDATE=1 # if APP_AUTH = OPENID automodifier les users existant
# IF APP_SYNCHRO=NINE2NINE
NINE_URL=
NINE_SECRET=
# If APP_MODEREGISTRATION != NULL
APP_MODEREGISTRATIONTERM=6 # Temps en heure de la durée de validité de l'inscription
# Proxy
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
# Audit
AUDIT_USE=1
# Sonde statistic
SONDE_USE=0
SONDE_URL=
# Mercure
MERCURE_URL=https://127.0.0.1/.well-known/mercure
MERCURE_PUBLIC_URL=https://127.0.0.1/.well-known/mercure
MERCURE_JWT_SECRET="!changeme!changeme!changeme!changeme!changeme!changeme!"
# Minio
MINIO_URL=http://127.0.0.1:9000
MINIO_KEY=minio
MINIO_SECRET=changeme
MINIO_BUCKET=ninegate
MINIO_ROOT=
MINIO_PATH_STYLE=1
MINIO_SECURE=0
# Hydra apps
HYDRA_LOGINCHALLENGE="http://127.0.0.1:4445/oauth2/auth/requests/login?login_challenge="
HYDRA_LOGINCHALLENGEACCEPT="http://127.0.0.1:4445/oauth2/auth/requests/login/accept?login_challenge="
HYDRA_CONSENTCHALLENGE="http://127.0.0.1:4445/oauth2/auth/requests/consent?consent_challenge="
HYDRA_CONSENTCHALLENGEACCEPT="http://127.0.0.1:4445/oauth2/auth/requests/consent/accept?consent_challenge="
# Lock
LOCK_DSN="postgresql://symfony:ChangeMe@127.0.0.1:5432/ninegate?serverVersion=13&charset=utf8"
# Sentry
SENTRY_DSN=

View File

@ -1,18 +0,0 @@
#!/bin/bash
set -eo pipefail
DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
export PATH="${PATH}:${DIR}/../node_modules/.bin"
function lint_commit_message {
local commit_message_file="$1"
cat "$commit_message_file" | commitlint
}
function main {
local commit_message_file="$1"
lint_commit_message "$commit_message_file"
}
main $@

32
.gitignore vendored
View File

@ -1,32 +0,0 @@
/docker-compose.override.yml
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/.data
/var/
/vendor/
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
/phpunit.xml
.phpunit.result.cache
.phpunit.result.cache
/phpunit.xml
/uploads
!/public/uploads/avatar
/public/uploads/avatar/*
!/public/uploads/avatar/admin.jpg
!/public/uploads/avatar/noavatar.jpg
!/public/uploads/avatar/system.jpg
!/public/uploads/avatar
/public/uploads/logo/*
!/public/uploads/logo/logo.png
/public/uploads/ckeditor
.php-cs-fixer.cache

View File

@ -1,15 +0,0 @@
def exec() {
String dockerfile = readFile(file:'Dockerfile')
dockerfile = """
${dockerfile}
RUN apt update && apt install -y php-gd php-curl php-zip curl
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs
RUN npm install -g yarn
""".stripIndent()
writeFile(file:'Dockerfile', text: dockerfile)
}
return this

1
.nvmrc
View File

@ -1 +0,0 @@
lts/hydrogen

View File

@ -1,12 +0,0 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__.'/src');
$config = new PhpCsFixer\Config();
return $config->setRules([
'@Symfony' => true,
'full_opening_tag' => false,
])
->setFinder($finder)
;

View File

@ -1 +0,0 @@
8.1

View File

@ -1,3 +0,0 @@
{
"esbonio.sphinx.confDir": ""
}

3
Jenkinsfile vendored
View File

@ -1,3 +0,0 @@
@Library('cadoles') _
symfonyAppPipeline('ubuntu:22.04')

85
Makefile Executable file → Normal file
View File

@ -1,69 +1,26 @@
SHELL := /bin/bash
################################
# Makefile
################################
ENGINE=kind
HARBOR_USER_NAME=afornerot
CLUSTER_NAME=nineskeletor
NAMESPACE=app-dev
POD=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-${PODNAME})
PODTOOLS=$(shell kubectl get pods --namespace=${NAMESPACE} --no-headers -o custom-columns=":metadata.name" | grep ^${CLUSTER_NAME}-adminer)
SOURCE=nineskeletor
VERSION=1.0
EOLE_VERSION=2.7
EOLE_RELEASE=2.7.1
PKGAPPS=web
################################
# Début de zone à ne pas éditer
################################
dockercomposebuild:
docker-compose build --no-cache
include eole.mk
include apps.mk
dockercomposeup:
make dockercomposedown
docker-compose up -d
docker-compose exec app bin/console d:s:u --force --complete
docker-compose exec app bin/console app:Init
################################
# Fin de zone à ne pas éditer
################################
dockercomposedown:
docker-compose stop
docker-compose rm -f redis-sentinel
dockercomposeinit:
docker-compose exec app bin/console d:f:l
dockercomposesh:
docker-compose exec app /bin/sh
deletecluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
createcluster:
${ENGINE} delete cluster --name=${CLUSTER_NAME}
${ENGINE} create cluster --config misc/k8s/${ENGINE}/${ENGINE}-cluster.yaml
atachcluster:
docker login reg.cadoles.com
mkdir -p misc/k8s/kustomization/base/secrets/dockerconfig
docker --config misc/k8s/kustomization/base/secrets/dockerconfig login reg.cadoles.com
mv misc/k8s/kustomization/base/secrets/dockerconfig/config.json misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson
mkdir -p misc/k8s/kustomization/overlays/dev/secrets/dockerconfig
cp misc/k8s/kustomization/base/secrets/dockerconfig/.dockerconfigjson misc/k8s/kustomization/overlays/dev/secrets/dockerconfig/.dockerconfigjson
applycluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster --server-side
applylbcluster:
kubectl apply -k misc/k8s/${ENGINE}/cluster/lb --server-side
watchcluster:
skaffold dev -p dev --cleanup=false --default-repo reg.cadoles.com/${HARBOR_USER_NAME}
sh:
kubectl exec --namespace=${NAMESPACE} ${POD} -it -- sh
deletenamespace:
kubectl delete all --all --namespace ${NAMESPACE}
getpods:
kubectl get pods --namespace ${NAMESPACE}
getservices:
kubectl get services --namespace ${NAMESPACE}
ldapsearch:
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk update
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- apk add openldap
kubectl exec --namespace=${NAMESPACE} ${PODTOOLS} -it -- ldapsearch -x -H ldap://nineskeletor-openldap:389 -D cn=admin,dc=nine,dc=fr -w openldap
# Makefile rules dedicated to application
# if exists
ifneq (, $(strip $(wildcard $(SOURCE).mk)))
include $(SOURCE).mk
endif

371
README.md Executable file → Normal file
View File

@ -1,154 +1,231 @@
# NINESKELETOR
# Renommer le squelette
## Dupliquer nineskeletor et renommer en nineXXXX
Puis effectuer les changement suivants
- Renommer db/nineskeletor-create-0.sql en db/nineXXXX-create-0.sql
- Modifier db/nineXXXX-create-0.sql et changer le nom de la base de données en nineXXXX
- Renommer dicos/90_nineskeletor.xml en dicos/90_nineXXXX.xml
- Modifier dicos/nineXXXX-nineXXXX.xml et remplacer tout les nineskeletor en nineXXXX
- Renommer logrotate/nineskeletor en logrotate/nineXXXX
- Modifier logrotate/nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer postservice/90-nineskeletor en postservice/90-nineXXXX
- Modifier postservice/90-nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer pretemplate/25-nineskeletor en pretemplate/25-nineXXXX
- Modifier pretemplate/25-nineXXXX et remplacer tout les nineskeletor en nineXXXX
- Renommer src/nineskeletor-1.0 en src/nineXXXX-1.0
- Modifier src/nineXXXX-1.0/webpack.config.js et remplacer tout les nineskeletor en nineXXXX
- Renommer sso/filtres/nineskeletor.ini en sso/filtres/nineXXXX.ini
- Renommer sso/filtres/nineskeletor_apps.ini en sso/filtres/nineXXXX_apps.ini
- Modifier sso/filtres/nineXXXX_apps.ini et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor.cron en tmpl/nineXXXX.cron
- Modifier tmpl/nineXXXX.cron et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-apache.conf en tmpl/nineXXXX-apache.conf
- Modifier tmpl/nineXXXX-apache.conf et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-db.yml en tmpl/nineXXXX-db.yml
- Modifier tmpl/nineXXXX-db.yml et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-env.local en tmpl/nineXXXX-env.local
- Modifier tmpl/nineXXXX-env.local et remplacer tout les nineskeletor en nineXXXX
- Renommer tmpl/nineskeletor-proxy.sh en tmpl/nineXXXX-proxy.sh
- Modifier Makefile et remplacer tout les nineskeletor en nineXXXX
- Remplacer logo public/uploads/logo/logo.png
Squelette applicatif symfony
## Compilier les asset
- apt-get install npm
- si proxy
- npm config set proxy "http://monproxyurl:monproxyport"
- npm config set https-proxy "http://monproxyurl:monproxyport"
- npm install -g yarn
- yarn install
- yarn encore dev
- yarn encore prod
## Installation for local dev
```
curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | sudo -E bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install git docker-compose composer symfony-cli php php-xml php-zip php-gd php-curl php-pgsql yarn
git clone https://forge.cadoles.com/Cadoles/nineskeletor.git
cd nineskeletor
symfony server:ca:install
cp .env .env.local
```
Change in .env.local APP_SECRET variabile
This secret is the init password for admin user
# Description du squelette
Change in .env.local MERCURE_JWT_SECRET variable
And report this secret in docker-compose.yml MERCURE_PUBLISHER_JWT_KEY and MERCURE_SUBSCRIBER_JWT_KEY
And finish with
```
bin/reconfigure.sh
```
## Run for local
```
symfony server:start
```
## Installation for apache
exec installation for local dev except /bin/reconfigure.sh
Between
Change in .env.local APP_WEBURL variable
For sample
```
APP_WEBURL=MyDomaine
```
Change in .env.local MERCURE variable like
The /hub alias must be the same on Apache configuration ProxyPass and ProxyPassReverse
```
MERCURE_URL=http://MyDomaine/hub/.well-known/mercure
MERCURE_PUBLIC_URL=http://MyDomaine/hub/.well-known/mercure
```
Create the file docker-compose.override.yml like
The port 9090 must be the same in the apache configuration ProxyPass and ProxyPassReverse
```
version: '3'
services:
mercure:
ports:
- "9090:80"
environment:
SERVER_NAME: ':80'
MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'
MERCURE_EXTRA_DIRECTIVES: |
cors_origins http://MyDomaine
```
And finish with
```
bin/reconfigure.sh
```
After install and configure apache
```
apt-get install apache libmodapache2
a2enmod rewrite proxy_http
service apache2 restart
```
sample apache configuration in /etc/apache2/site-available/000-
```
<VirtualHost *:80>
DocumentRoot /var/www/html/nineskeletor/public
CustomLog /var/log/apache2/access.log common
ErrorLog /var/log/apache2/error.log
<Directory /var/www/html/nineskeletor/public>
DirectoryIndex index.php
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI}::$0 ^(/.+)/(.*)::\2$
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 307 ^/$ /index.php/
</IfModule>
</IfModule>
</Directory>
# For mercure server
ProxyPass /hub/ http://localhost:9090/
ProxyPassReverse /hub/ http://localhost:9090/
</VirtualHost>
<VirtualHost *:1080>
# For mailer server
ProxyPass / http://localhost:1080/
ProxyPassReverse / http://localhost:1080/
</VirtualHost>
```
## Cron Job
Make sure the cron job is running all the minute
You can copy this bin/nineskeletor.cron in your crontab
```
cp /var/www/html/nineskeletor/bin/nineskeletor.cron /etc/cron.d/nineskeletor
```
## Messenger worker
Make sure the messenger consume the bus
Needed to send mail
You can copy this bin/nineskeletor.service in your systemd
```
cp /var/www/html/nineskeletor/bin/nineskeletor.service /etc/systemd/system/
systemctl enable nineskeletor.service
systemctl start nineskeletor.service
```
## Bundle
- DebugBundle
- DoctrineBundle
- DoctrineMigrationsBundle
- FOSCKEditorBundle
- FOSRestBundle
- FrameworkBundle
- KnpSnappyBundle
- MakerBundle
- MonologBundle
- NelmioApiDocBundle
- OneupUploaderBundle
- SecurityBundle
- SensioFrameworkExtraBundle
- SwiftmailerBundle
- TetranzSelect2EntityBundle
- TwigBundle
- TwigExtraBundle
- WebProfilerBundle
- WebpackEncoreBundle
- ramsey/uuid
- cboden/ratchet
## Asset
### Tag app
- jQuery = https://www.npmjs.com/package/jquery
- jqueryui = https://www.npmjs.com/package/jqueryui
- bootstrap = https://www.npmjs.com/package/bootstrap
- timepicki = https://www.npmjs.com/package/timepicki
- datatables.net-bs4 = https://www.npmjs.com/package/datatables.net-bs4
- fontawsome-free = https://www.npmjs.com/package/@fortawesome/fontawesome-free
- bs-stepper = https://www.npmjs.com/package/bs-stepper
- masonry-layout = https://www.npmjs.com/package/masonry-layout
- react-slick = https://www.npmjs.com/package/react-slick
- image-loaded = https://www.npmjs.com/package/image-loaded
- moment = https://www.npmjs.com/package/moment
- select2 = https://www.npmjs.com/package/select2
- crop-select-js = https://www.npmjs.com/package/crop-select-js
- spectrum-colorpicker2 = https://www.npmjs.com/package/spectrum-colorpicker2
### Tag fullcalendar
- @fullcalendar/core = https://www.npmjs.com/package/@fullcalendar/core
- @fullcalendar/interaction = https://www.npmjs.com/package/@fullcalendar/interaction
- @fullcalendar/daygrid = https://www.npmjs.com/package/@fullcalendar/daygrid
### Tag dropzone
- dropzone = https://www.npmjs.com/package/dropzone
## Parameters
Provient du template env.local
- appEnv = PROD
- appSecret = valeur du fichier .key autogénéré au premier reconfigure
- appWeburl = Valeur du dicos web_url
- appAuth = Valeur du dicos = CAS / SQL
- appAlias = En dur l'alias web
- appName = Nom de l'application
- appCron = En dur à true pour activer le système de cron
- appMasteridentity = Valeur du dicos = Ninegate / LDAP / SQL
- appMasterurl = Si appMasteridentity la valeur du dicos correspondant à l'url du Ninegate maître
- appMasterkey = Si appMasteridentity la valeur du dicos correspondant à la clé d'API du Ninegate maître
- databaseName = En dur le nom de la base
- databaseUser = En dur le user de la base
- databasePassword = Autogénéré par le reconfigure
- databaseHost = Valeur du dicos pour le host de la base
- appMailmethod = Valeur du dicos soit sendmail soit smtp. sendmail par défaut si exim est activé sur le serveur
- appMailurl = Si smtp url calculé combinant smtphost smtpport smtpencryption smtpauthmode smtpuser smtppwd
- appMailnoreply = Valeur du dicos du noreplay
- ldapModel = si masteridentity à LDAP soit open soit scribe
- ldapHost = Valeur dicos Host LDAP
- ldapPort = Valeur dicos Port LDAP
- ldapUser = Valeur dicos User LDAP
- ldapPassword = Valeur dicos Password LDAP
- ldapBasedn = Valeur dicos Basedn LDAP
- ldapUsername = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme username
- ldapFirstname = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme firstname
- ldapLastname = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme lastname
- ldapEmail = si Scribe en dur sinon valeur du dicos champs annuaire utilisé comme email
- ldapFiltergroup = si Scribe en dur sinon valeur du dicos filtre ldap de recherche des groupes
- ldapFilteruser = si Scribe en dur sinon valeur du dicos filtre ldap des groupes
- ldapAdmins = Liste des admins obligatoire = Admin + valeur dicos
- casHost = Valeur dicos du host SSO
- casPort = Valeur dicos du Porst SSO
- casPath = Valeur dicos du Path SSO
- casUsername = Valeur en dur correspondant au filtre sso du username
- casEmail = Valeur en dur correspondant au filtre sso du email
- casLastname = Valeur en dur correspondant au filtre sso du lastname
- casFirstname = Valeur en dur correspondant au filtre sso du fistname
- proxyUse = Valeur dicos utiliser oui/non un proxy
- proxyHost = Si oui valeurs du dicos du host proxy
- proxyPort = Si oui valeurs du dicos du post proxy
- sondeUse = Valeur dicos utiliser oui/non une sonde statistique
- sondeUrl = Si oui url de la sonde statistique
## Sécurité
4 rôles possibles
- ROLE_ADMIN
- ROLE_MODO
- ROLE_MASTER
- ROLE_USER
4 routes protégés
- /user = accèssible à ROLE_USER / ROLE_MASTER / ROLE_MODO / ROLE_ADMIN
- /master = accèssible à ROLE_MASTER / ROLE_MODO / ROLE_ADMIN
- /modo = = accèssible à ROLE_MODO / ROLE_ADMIN
- /admin = = accèssible à ROLE_ADMIN
## Job
Nineskeletor intègre un système de job.
Ce système va exécuter des commandes symfony à interval régulier.
De base les jobs suivants sont livrés :
- app:sendMail = toutes les minutes = Execution du spool de mail en attente
- app:dumpBdd = toutes les nuits à 2h00 = Dump de la base
- app:purgeFile = toutes les nuits à 3h00 = Suppresion des fichiers obsolètes
- app:synchroUsers = toutes les nuites à 3h00 = Synchronisation des comptes utilisateurs soit via LDAP soit via Ninegate
Pour ajouter un job à la listes, modifier la commande app:initCron qui sera exécutée à chaque reconfigure
## Service
- app.password.encoder = encodage password sur la methode que l'annuaire
- app.upload.listener = action à réaliser sur upload via oneupload
- app.upload.samename = permet d'uploader un fichier et préserver le nom de fichier via oneupload
- app.ldap.service = fonction ldap
- app.sendmail.transport = executuion du spool de mail via sendmail
- app.mail.service = fonction envoit de mail
- app.twig.extension = extention twig
## Twig
### Twig Constantes
Variables globales twig reprises des parametres symfony
- appAlias
- appAuth
- appName
- appCron
- appMasteridentity
- sondeUse
- sondeUrl
### Twig Extention
App\Twig\AppExtension
- filtre = urlAvatar à placer avec user.avatar afin de définir l'url complète de l'avatar du user
### Twig Template de base
#### templates/base.html.twig
Deux paramétres non obligatoire
- useheader = permet d'afficher ou non la bannière dans la page = false par défaut
- usesidebar = permet d'afficher oun non la sidebar dans la page = false par défaut
- usemonocolor = afin de placer uniquement la couleur dark sur la page
Block
- block encorelinktags = pour déclarer des encore_link_tags spécifique à la page (encorelinktags app est intégré de base)
- block localstyle = pour déclarer des propriétés css spécifique à page (Include/style.css.twig est intégré de base)
- block body = le corps de la page
- block encorescripttags pour déclarer des encore_script_tags spécifique à la page (encorescripttags app est intégré de base)
- block localjavascript = pour déclarer du js spécifique à la page (Include/javascript.js.twig est intégré de base)
#### templates/Include/style.css.twig
Style de l'applicaiton en surcouche de bootstrap
#### templates/Include/sidebar.html.twig
La sidebar de l'application quand elle est affichée
#### templates/Include/javascript.js.twig
Librairie js de l'application
- object a et button s'ils ont un attribut data-method et data_confirm proposeront une confirmation à l'utilisateur avant de poursuivre l'action
- ModalLoad(idmodal,titre,url) = permet d'afficher en modal l'url indiqué en parametre. Par défaut on dispose de la modal #mymodal
#### templates/Form/fields.htms.twig
Mise en forme de champs de formulaire

64
apps.mk Normal file
View File

@ -0,0 +1,64 @@
#
# NE PAS EDITER CE FICHIER
#
# Voir Makefile
##########################
# Application web envole #
##########################
ifneq (, $(filter oui web, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out X.X, $(strip $(VERSION))))
$(error $$(VERSION) variable has incorrect value '$(VERSION)')
endif
# Where to store web application files
WEB_PATH := $(DESTDIR)/var/www/html
# Envole
sharenvole_PROG_DIR := $(DESTDIR)/usr/share/envole/$(SOURCE)
src_$(SOURCE)-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)
src_plugins-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/plugin
src_lang-$(VERSION)_REC_DIR := $(WEB_PATH)/$(SOURCE)/lang
endif
##########################
# Application EOLE flask #
##########################
ifneq (, $(filter flask, $(PKGAPPS)))
#
# Sanity check
#
ifeq (, $(filter-out XXX, $(strip $(FLASK_MODULE))))
$(error $$(FLASK_MODULE) variable has incorrect value '$(FLASK_MODULE)')
endif
ifeq (, $(strip $(wildcard src/$(FLASK_MODULE).conf)))
$(error missing eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# Everything is related to mount point
APPS_MOUNT_POINT := $(shell sed -ne 's|^"MOUNT_POINT"[[:space:]]*:[[:space:]]*"/\([^"]*\)",|\1|p' \
src/$(FLASK_MODULE).conf)
ifeq (, $(strip $(APPS_MOUNT_POINT)))
$(error no "MOUNT_POINT" in eoleflask configuration file 'src/$(FLASK_MODULE).conf')
endif
# eole-flask configuration
src_DATA_DIR := $(DESTDIR)/etc/eole/flask/available
# Where to store flask application files
FLASK_PATH := $(eole_DIR)/flask/$(APPS_MOUNT_POINT)
# static files
src_$(FLASK_MODULE)_static_REC_DIR := $(FLASK_PATH)/static
src_$(FLASK_MODULE)_templates_REC_DIR := $(FLASK_PATH)/templates
src_$(FLASK_MODULE)_instance_REC_DIR := $(FLASK_PATH)/resources
endif

View File

@ -1,51 +0,0 @@
// JQuery
window.$ = window.jQuery = require('jquery');
// JQueryui
require('jquery-ui');
// Bootstrap
require('bootstrap');
require('bootstrap/dist/css/bootstrap.css');
// Fontawesome
require('@fortawesome/fontawesome-free/css/all.css');
// Datatables
require('datatables.net-bs4');
require('datatables.net-bs4/css/dataTables.bootstrap4.min.css');
require('./js/datatables.init.js');
// Select2
require('select2');
require('select2/dist/js/i18n/fr.js');
require('select2/dist/css/select2.css');
require('@ttskch/select2-bootstrap4-theme/dist/select2-bootstrap4.css');
$(() => {
$('.select2entity').select2(
{
theme: 'bootstrap4',
language: "fr"
}
);
});
// Spectrum-colorpicker2
require('spectrum-colorpicker2/dist/spectrum.min.js');
require('spectrum-colorpicker2/dist/spectrum.min.css');
// CropSelectJs
require('crop-select-js/crop-select-js.min.css');
window.CropSelectJs = require('crop-select-js/crop-select-js.min.js');
// Start the Stimulus application
import './bootstrap';
// App sytle
import './styles/font.css';
import './styles/app.css';
// App js
require('./js/app.js');

11
assets/bootstrap.js vendored
View File

@ -1,11 +0,0 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true,
/\.[jt]sx?$/
));
// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);

View File

@ -1,4 +0,0 @@
{
"controllers": [],
"entrypoints": []
}

View File

@ -1,16 +0,0 @@
import { Controller } from '@hotwired/stimulus';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
}
}

View File

@ -1,19 +0,0 @@
require('dropzone/dist/dropzone.css');
/*
window.Dropzone = require('dropzone/dist/dropzone.js');
*/
const { Dropzone } = require("dropzone");
document.addEventListener('DOMContentLoaded', function() {
var elt = document.getElementById('mydropzone');
console.log($(elt).data("maxfiles"))
var mydropzone = new Dropzone(elt, {
acceptedMimeTypes: $(elt).data("acceptedMimeTypes"),
maxFiles: $(elt).data("maxFiles"),
success: function( file, response ){
dropzonesuccess(file,response);
},
});
global.mydropzone=mydropzone;
});

Binary file not shown.

View File

@ -1,69 +0,0 @@
$(document).ready(function() {
// Color
$(".pick-a-color").spectrum(
{
type: "text",
showAlpha: false
}
);
$(".pick-a-color").attr("autocomplete","off");
// method confirm
var doit = true;
$("a[data-method]").on('click',function(){
if($(this).data('confirm')){
doit = confirm($(this).data('confirm'));
if(!doit) return false;
}
});
$("button[data-method]").on('click',function(){
if($(this).data('confirm')){
doit = confirm($(this).data('confirm'));
if(!doit) return false;
}
});
// Modal
$(".btn-modal").click(function() {
$("#"+$(this).data("modalid")+" .modal-title").text($(this).data("modaltitle"));
$("#"+$(this).data("modalid")+" iframe").attr("src",$(this).data("modalurl"));
$("#"+$(this).data("modalid")).modal("show");
});
// Resize
resize();
// Focus
$("#page").focus();
});
$( window ).resize(function() {
resize();
});
function resize() {
console.log("resize");
if($("#header").is(":visible")){
$(".navbar-logo").hide();
$("#menulink").hide();
$("#header").hide();
}
else {
$(".navbar-logo").show();
$("#menulink").show();
$("#header").show();
}
var footerheight=$("footer").height();
if(footerheight) footerheight=footerheight+10;
else footerheight=0;
console.log(footerheight);
$("main").css("height",$(window).height()-$(".header").height()-footerheight);
$("#page").css("height",$(window).height()-$(".header").height()-footerheight);
$("#sidebar").css("min-height",$("body").height()-$(".header").height());
}

View File

@ -1,31 +0,0 @@
$(document).ready(function() {
$.extend( $.fn.dataTable.defaults, {
responsive: true,
"iDisplayLength": 1000,
"scrollX": true,
"oLanguage": {
"sThousands": " ",
"sProcessing": "Traitement en cours...",
"sSearch": "Rechercher&nbsp;:",
"sLengthMenu": "Afficher _MENU_ &eacute;l&eacute;ments",
"sInfo": "Affichage de l'&eacute;lement _START_ &agrave; _END_ sur _TOTAL_ &eacute;l&eacute;ments",
"sInfoEmpty": "Affichage de l'&eacute;lement 0 &agrave; 0 sur 0 &eacute;l&eacute;ments",
"sInfoFiltered": "(filtr&eacute; de _MAX_ &eacute;l&eacute;ments au total)",
"sInfoPostFix": "",
"sLoadingRecords": "Chargement en cours...",
"sZeroRecords": "Aucun &eacute;l&eacute;ment &agrave; afficher",
"sEmptyTable": "Aucune donnée disponible dans le tableau",
"oPaginate": {
"sFirst": "Premier",
"sPrevious": "Pr&eacute;c&eacute;dent",
"sNext": "Suivant",
"sLast": "Dernier"
},
"oAria": {
"sSortAscending": ": activer pour trier la colonne par ordre croissant",
"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
}
},
//"stateSave": true
});
});

View File

@ -1,251 +0,0 @@
/* COLOR */
body {
background-color: var(--colorbgbodylight);
color: var(--colorftbodylight);
}
.header {
color: var(--colorfttitledark);
}
.header h1, .header a, #sidebar a, #sidebar hr{
color: var(--colorfttitledark);
}
.header a:hover, #sidebar a:hover {
color: var(--colorfttitledark);
text-decoration:none;
}
.navbar {
background-color: var(--colorbgbodydark);
}
.table,
.table-hover > tbody > tr:hover > *,
.table-striped > tbody > tr:nth-of-type(odd) > * {
color: var(--colorftbodylight);
}
/* FONT */
body {
font-family: var(--fontbody);
}
h1, h2, h3, .navbar-brand, .card-header, .modal-header h4, .widgetheader .title {
font-family: var(--fonttitle);
color: var(--colorfttitlelight);
}
h1 { font-size: var(--fontsizeh1); }
h2 { font-size: var(--fontsizeh2); }
h3 { font-size: var(--fontsizeh3); }
h4 { font-size: var(--fontsizeh4); }
.card-header .custom-control, .grid-item-title h2 {
font-family: var(--fontbody);
}
/* GLOBAL */
html, body {
height:100%;
}
a {
text-decoration: none;
cursor: pointer;
color: var(--colorfttitlelight);
}
a:hover {
color: var(--colorfttitlelight-darker);
}
main {
display:flex;
overflow:hidden;
}
.dataTable {
border-style: solid none solid solid;
border-width: 1px;
}
.avatar {
width:30px;
height:30px;
background-color: var(--colorbgbodydark);
border-radius: 100%;
}
.select2,.select2-container .select2-search--inline {
width:100%!important;
}
/* HEADER */
.header h1 {
text-transform: uppercase;
padding-left: 10px;
padding-top: 15px;
margin: 0px;
line-height:var(--lineheighth1);
}
.header h1 small {
font-size:60%;
}
#header .nav-link {
padding:0.5rem;
}
@media (max-width: 991px) {
#header {
display:none !important;
}
}
/* NAVBAR */
.nav {
vertical-align: middle;
}
.navbar-logo {
padding: 0 0 0 0.5rem !important;
}
.navbar-logo img{
height:20px;
}
.navbar i {
font-size: 20px;
min-width: 30px;
height:20px;
}
/* MENU */
#menu {
height:50px;
padding: 0px 0px 0px 10px !important;
}
#menu .navbar-logo {
margin-right: 10px;
}
@media (max-width: 991px) {
#menu {
display:flex !important;
height: auto;
padding: 0px !important;
}
.navbar-logo {
padding: 10px 5px 10px 10px !important;
}
.navbar-logo img {
height:40px;
}
.navbar i {
font-size: 20px;
min-width: 30px;
height:20px;
}
#switchHeader {
display:none;
}
}
/* SIDEBAR */
#sidebar {
background-color: var(--colorbgbodydark);
width: 100%;
max-width:300px;
overflow-y: auto;
}
#sidebar span {
padding-left: 5px;
}
#sidebar .nav-pills .nav-link {
border-radius:0px;
}
#sidebar .nav-pills .nav-link.active {
background-color: var(--colorbgbodydark-darker);
}
#sidebar .nav-link-items {
display: none;
}
#sidebar .nav-link-item {
padding-left: 2em;
}
@media (max-width: 991px) {
#sidebar {
max-width:65px;
}
#sidebar span {
display: none;
}
#sidebar i {
font-size: 25px;
}
#sidebar .nav-link-item {
padding-left: 1rem;
}
#sidebar .nav-link-section {
display:block;
margin-bottom: 10px;
}
#sidebar .nav-link-title {
display:none;
}
#sidebar .nav-link-items {
display:block !important;
border-bottom: 1px solid var(--colorfttitledark);
}
}
/* PAGE */
#page {
overflow-y: auto;
width:100%;
}
/* FOOTER */
footer {
padding:5px 30px;
background-color: var(--colorbgbodydark);
color: var(--colorftbodydark) !important;
position:absolute;
bottom: 0px;
left:0px;
width: 100%;
}
.footer-adress {
font-size:80%;
width:50%;
}
.footer-adress p {
margin:0px;
}
.footer-social {
text-align: right;
width:50%;
}
footer a {
color: var(--colorftbodydark) !important;
}

View File

@ -1,189 +0,0 @@
@font-face {
font-family: 'Redressed';
src: url('../fonts/Redressed-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Acme-Regular';
src: url('../fonts/Acme-Regular-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Peacesans';
src: url('../fonts/Peacesans-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Roboto-Regular';
src: url('../fonts/Roboto-Regular-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Justanotherhand-Regular';
src: url('../fonts/Justanotherhand-Regular-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Lato-Regular';
src: url('../fonts/Lato-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'ABeeZee-Regular';
src: url('../fonts/ABeeZee-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'AlfaSlabOne-Regular';
src: url('../fonts/AlfaSlabOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Anton-Regular';
src: url('../fonts/Anton-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'FredokaOne-Regular';
src: url('../fonts/FredokaOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Overpass-Black';
src: url('../fonts/Overpass-Black.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Righteous-Regular';
src: url('../fonts/Righteous-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Signika-Regular';
src: url('../fonts/Signika-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Teko-Bold';
src: url('../fonts/Teko-Bold.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'LuckiestGuy-Regular';
src: url('../fonts/LuckiestGuy-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Baloo-Regular';
src: url('../fonts/Baloo-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'CarterOne-Regular';
src: url('../fonts/CarterOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Chewy-Regular';
src: url('../fonts/Chewy-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Courgette-Regular';
src: url('../fonts/Courgette-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'LexendDeca-Regular';
src: url('../fonts/LexendDeca-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'RubikMonoOne-Regular';
src: url('../fonts/RubikMonoOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'SigmarOne-Regular';
src: url('../fonts/SigmarOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Viga-Regular';
src: url('../fonts/Viga-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Grandstander';
src: url('../fonts/Grandstander-Black.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'PassionOne';
src: url('../fonts/PassionOne-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Theboldfont';
src: url('../fonts/theboldfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Futura-Condensed-Extra-Bold';
src: url('../fonts/Futura-Condensed-Extra-Bold.otf') format('opentype');
font-weight: normal;
font-style: normal;
}

View File

@ -1,17 +0,0 @@
#!/usr/bin/env php
<?php
use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
return new Application($kernel);
};

View File

@ -1,12 +0,0 @@
#!/bin/bash
SERVICE="messager.sh"
pgrep -x "$SERVICE" >/tmp/messager.pid
NB=$(wc -l < /tmp/messager.pid)
if [ ${NB} -gt 1 ]
then
echo "$SERVICE is running"
else
echo "$SERVICE stopped"
/var/www/html/nineskeletor/bin/console messenger:consume async --memory-limit=512m --env=prod
fi

View File

@ -1 +0,0 @@
* * * * * www-data /var/www/html/nineskeletor/bin/console app:Cron &>/dev/null

View File

@ -1,13 +0,0 @@
[Unit]
StartLimitIntervalSec=20s
StartLimitBurst=5
[Service]
ExecStart=/usr/bin/php -d memory_limit=-1 /var/www/html/nineskeletor/bin/console messenger:consume async --memory-limit=512m --env=prod
Restart=always
RestartSec=1
TimeoutSec=300
User=www-data
[Install]
WantedBy=multi-user.target

View File

@ -1,19 +0,0 @@
#!/usr/bin/env php
<?php
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}

View File

@ -1,41 +0,0 @@
#!/bin/bash
# Se positionner sur la racine du projet
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd ${DIR}
cd ..
DIR=$(pwd)
# Import des env
. $DIR/.env
. $DIR/.env.local
docker-compose stop
docker-compose up -d
# Déclaration d'un proxy
if [[ "$PROXY_USE" == "1" ]]
then
export HTTP_PROXY="$PROXY_HOST:$PROXY_PORT"
export HTTPS_PROXY="$PROXY_HOST:$PROXY_PORT"
fi
# Suppression des logs trop ancien
if [[ -d $DIR/var/log ]]
then
find $DIR/var/log -mindepth 1 -mtime +7 -delete
fi
# Installation des dépendances composer
echo COMPOSER = Install
composer install --no-interaction
bin/console doctrine:migrations:migrate --no-interaction
bin/console app:Init
bin/console app:Cron
# Permissions
echo PERMISSIONS
./bin/perm.sh www-data
echo

View File

@ -1 +0,0 @@
module.exports = {extends: ['@commitlint/config-conventional']};

View File

@ -1,136 +0,0 @@
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"aws/aws-sdk-php": "^3.234",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.6",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
"friendsofsymfony/ckeditor-bundle": "^2.4",
"friendsofsymfony/rest-bundle": "^3.3",
"gregwar/captcha-bundle": "^2.2",
"jasig/phpcas": "^1.5",
"mashape/unirest-php": "^3.0",
"nelmio/api-doc-bundle": "^4.9",
"oneup/uploader-bundle": "^3.2",
"phpdocumentor/reflection-docblock": "^5.3",
"phpstan/phpdoc-parser": "^1.5",
"predis/predis": "^2.2",
"ramsey/uuid": "^4.3",
"sensio/framework-extra-bundle": "^6.1",
"sentry/sentry-symfony": "^4.3",
"symfony/asset": "6.1.*",
"symfony/console": "*",
"symfony/doctrine-messenger": "6.1.*",
"symfony/dotenv": "*",
"symfony/expression-language": "6.1.*",
"symfony/flex": "^2",
"symfony/form": "6.1.*",
"symfony/framework-bundle": "*",
"symfony/http-client": "6.1.*",
"symfony/intl": "6.1.*",
"symfony/lock": "6.1.*",
"symfony/mailer": "6.1.*",
"symfony/maker-bundle": "^1.44",
"symfony/mercure-bundle": "^0.3.5",
"symfony/mime": "6.1.*",
"symfony/monolog-bundle": "^3.0",
"symfony/notifier": "6.1.*",
"symfony/process": "6.1.*",
"symfony/property-access": "6.1.*",
"symfony/property-info": "6.1.*",
"symfony/proxy-manager-bridge": "6.1.*",
"symfony/runtime": "*",
"symfony/security-bundle": "6.1.*",
"symfony/serializer": "6.1.*",
"symfony/string": "6.1.*",
"symfony/translation": "6.1.*",
"symfony/twig-bundle": "6.1.*",
"symfony/validator": "6.1.*",
"symfony/web-link": "6.1.*",
"symfony/webpack-encore-bundle": "^1.12",
"symfony/yaml": "*",
"tetranz/select2entity-bundle": "^3.1",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/loverg-c/unirest-php"
}
],
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/flex": true,
"symfony/runtime": true
},
"optimize-autoloader": true,
"preferred-install": {
"*": "dist"
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
"scripts": {
"auto-scripts": {
"npm ci": "script",
"npm run encore -- dev": "script",
"npm run encore -- prod": "script",
"cache:clear --env=dev": "symfony-cmd",
"cache:clear --env=prod": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"conflict": {
"symfony/symfony": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.1.*"
}
},
"require-dev": {
"doctrine/doctrine-fixtures-bundle": "^3.4",
"lasserafn/php-initial-avatar-generator": "^4.2",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "6.1.*",
"symfony/css-selector": "6.1.*",
"symfony/debug-bundle": "6.1.*",
"symfony/phpunit-bridge": "^6.1",
"symfony/stopwatch": "6.1.*",
"symfony/web-profiler-bundle": "6.1.*"
}
}

13661
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Oneup\UploaderBundle\OneupUploaderBundle::class => ['all' => true],
Tetranz\Select2EntityBundle\TetranzSelect2EntityBundle::class => ['all' => true],
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],
Sentry\SentryBundle\SentryBundle::class => ['prod' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Nelmio\ApiDocBundle\NelmioApiDocBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
];

View File

@ -1,5 +0,0 @@
when@dev:
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

View File

@ -1,42 +0,0 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '13'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

View File

@ -1,6 +0,0 @@
doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/migrations'
enable_profiler: '%kernel.debug%'

View File

@ -1,37 +0,0 @@
# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
fos_ck_editor:
base_path: "build/ckeditor"
js_path: "build/ckeditor/ckeditor.js"
configs:
full_config:
language: fr
toolbar: "my_full_toolbar"
extraPlugins: ["html5video","youtube","justify","templates","iframe","colorbutton"]
small_config:
language: fr
toolbar: "my_small_toolbar"
removePlugins: 'elementspath'
toolbars:
configs:
my_full_toolbar: [ "@document1", "-", "@clipboard1", "-", "@basicstyles1", "-", "@paragraph1", "/", "@links1", "-", "@insert1", "-", "@styles1", "-" , "@colors1", "-" , "@tools1" ]
my_small_toolbar: [ "@basicstyles1", "-", "@paragraph3", "-", "@insert3"]
items:
document1: [ 'Source','-','NewPage','DocProps','Preview','Print','-','Templates' ]
clipboard1: [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ]
basicstyles1: [ 'Bold','Italic','Underline','RemoveFormat' ]
paragraph1: [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ]
paragraph2: [ 'JustifyLeft','JustifyCenter','JustifyRight','NumberedList','BulletedList' ]
paragraph3: [ 'NumberedList','BulletedList' ]
links1: [ 'Link','Unlink','Anchor' ]
insert1: [ 'Image','Html5video','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ]
insert2: [ 'Image','Table','Smiley','Link','Unlink' ]
insert3: [ 'Smiley','Link','Unlink' ]
styles1: [ 'Styles','Format','Font','FontSize' ]
colors1: [ 'TextColor','BGColor' ]
tools1: [ 'Maximize', 'ShowBlocks','-','About' ]

View File

@ -1,11 +0,0 @@
# Read the documentation: https://symfony.com/doc/master/bundles/FOSRestBundle/index.html
fos_rest:
param_fetcher_listener: true
body_listener: true
format_listener:
enabled: true
rules:
- { path: '/rest', priorities: ['json', 'xml'], fallback_format: 'html' }
- { path: '/', fallback_format: 'html' }

View File

@ -1,28 +0,0 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
http_method_override: false
# Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support.
session:
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler
save_path: '@Redis'
name: '%env(APP_ALIAS)%'
gc_probability: null
gc_maxlifetime: '%env(resolve:APP_SESSIONTIME)%'
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true
#fragments: true
php_errors:
log: true
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file

View File

@ -1,2 +0,0 @@
framework:
lock: '%env(LOCK_DSN)%'

View File

@ -1,8 +0,0 @@
mercure:
hubs:
default:
url: '%env(MERCURE_URL)%'
public_url: '%env(MERCURE_PUBLIC_URL)%'
jwt:
secret: '%env(MERCURE_JWT_SECRET)%'
publish: '*'

View File

@ -1,24 +0,0 @@
framework:
messenger:
failure_transport: failed
transports:
# https://symfony.com/doc/current/messenger.html#transport-configuration
async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
options:
use_notify: true
check_delayed_interval: 60000
retry_strategy:
max_retries: 3
multiplier: 2
failed: 'doctrine://default?queue_name=failed'
# sync: 'sync://'
routing:
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
Symfony\Component\Notifier\Message\ChatMessage: async
Symfony\Component\Notifier\Message\SmsMessage: async
# Route your messages to the transports
# 'App\Message\YourMessage': async

View File

@ -1,61 +0,0 @@
monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
when@dev:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
when@test:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
when@prod:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
nested:
type: stream
path: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr

View File

@ -1,9 +0,0 @@
nelmio_api_doc:
documentation:
info:
title: '%appName%'
description:
version: 1.0.0
areas: # to filter documented areas
path_patterns:
- /rest # Accepts routes under /rest except /rest/doc

View File

@ -1,16 +0,0 @@
framework:
notifier:
#chatter_transports:
# slack: '%env(SLACK_DSN)%'
# telegram: '%env(TELEGRAM_DSN)%'
#texter_transports:
# twilio: '%env(TWILIO_DSN)%'
# nexmo: '%env(NEXMO_DSN)%'
channel_policy:
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
admin_recipients:
- { email: admin@example.com }

View File

@ -1,14 +0,0 @@
oneup_uploader:
mappings:
avatar:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/avatar"
logo:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/logo"
header:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/header"

View File

@ -1,12 +0,0 @@
framework:
router:
utf8: true
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
#default_uri: http://localhost
when@prod:
framework:
router:
strict_requirements: null

View File

@ -1,54 +0,0 @@
security:
password_hashers:
Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface:
id: 'App\Service\PasswordEncoder'
providers:
main:
entity:
class: App\Entity\User
property: username
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
pattern: ^/
provider: main
context: maincontext
user_checker: App\Service\UserChecker
form_login:
login_path: app_login
check_path: app_login
default_target_path: app_home
use_referer: true
csrf_parameter: _csrf_security_token
csrf_token_id: a_private_string
logout:
invalidate_session: true
path: app_kill
target: app_home
access_control:
- { path: ^/all, roles: [ROLE_ADMIN, ROLE_MODO, ROLE_MASTER, ROLE_MANAGER, ROLE_USER] }
- { path: ^/user, roles: [ROLE_USER] }
- { path: ^/manager, roles: [ROLE_MANAGER] }
- { path: ^/master, roles: [ROLE_MASTER] }
- { path: ^/modo, roles: [ROLE_MODO] }
- { path: ^/admin, roles: [ROLE_ADMIN] }
when@test:
security:
password_hashers:
# By default, password hashers are resource intensive and take time. This is
# important to generate secure password hashes. In tests however, secure hashes
# are not important, waste resources and increase test times. The following
# reduces the work factor to the lowest possible values.
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: auto
cost: 4 # Lowest possible value for bcrypt
time_cost: 3 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon

View File

@ -1,20 +0,0 @@
when@prod:
sentry:
dsn: '%env(SENTRY_DSN)%'
# If you are using Monolog, you also need these additional configuration and services to log the errors correctly:
# https://docs.sentry.io/platforms/php/guides/symfony/#monolog-integration
# register_error_listener: false
# monolog:
# handlers:
# sentry:
# type: service
# id: Sentry\Monolog\Handler
# services:
# Sentry\Monolog\Handler:
# arguments:
# $hub: '@Sentry\State\HubInterface'
# $level: !php/const Monolog\Logger::ERROR
# $bubble: false

View File

@ -1,13 +0,0 @@
framework:
default_locale: en
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en
# providers:
# crowdin:
# dsn: '%env(CROWDIN_DSN)%'
# loco:
# dsn: '%env(LOCO_DSN)%'
# lokalise:
# dsn: '%env(LOKALISE_DSN)%'

View File

@ -1,35 +0,0 @@
twig:
default_path: '%kernel.project_dir%/templates'
form_themes:
- 'Form/fields.html.twig'
- '@TetranzSelect2Entity/Form/fields.html.twig'
globals:
appAlias: '%appAlias%'
appName: '%appName%'
appMasteridentity: '%appMasteridentity%'
appAuth: '%appAuth%'
appModeregistration: '%appModeregistration%'
appSynchro: '%appSynchro%'
appSynchroPurgeUser: '%appSynchroPurgeUser%'
appNiveau01label: '%appNiveau01label%'
appNiveau01labels: '%appNiveau01labels%'
appNiveau02use: '%appNiveau02use%'
appNiveau02label: '%appNiveau02label%'
appNiveau02labels: '%appNiveau02labels%'
appNiveau02mandatory: '%appNiveau02mandatory%'
appNiveau03use: '%appNiveau03use%'
appNiveau03label: '%appNiveau03label%'
appNiveau03labels: '%appNiveau03labels%'
appNiveau03mandatory: '%appNiveau03mandatory%'
appNiveau04use: '%appNiveau04use%'
appNiveau04label: '%appNiveau04label%'
appNiveau04labels: '%appNiveau04labels%'
appNiveau04mandatory: '%appNiveau04mandatory%'
appGroupuse: '%appGroupuse%'
sondeUse: '%sondeUse%'
sondeUrl: '%sondeUrl%'
auditUse: '%auditUse%'
when@test:
twig:
strict_variables: true

View File

@ -1,13 +0,0 @@
framework:
validation:
email_validation_mode: html5
# Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping:
# App\Entity\: []
when@test:
framework:
validation:
not_compromised_password: false

View File

@ -1,15 +0,0 @@
when@dev:
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }
when@test:
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }

View File

@ -1,49 +0,0 @@
webpack_encore:
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
output_path: '%kernel.project_dir%/public/build'
# If multiple builds are defined (as shown below), you can disable the default build:
# output_path: false
# Set attributes that will be rendered on all script and link tags
script_attributes:
defer: false
# Uncomment (also under link_attributes) if using Turbo Drive
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
# 'data-turbo-track': reload
# link_attributes:
# Uncomment if using Turbo Drive
# 'data-turbo-track': reload
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
# crossorigin: 'anonymous'
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
# preload: true
# Set to true to throw an exception if the entrypoints.json file is missing or an entry is missing from the data
strict_mode: false
# If you have multiple builds:
# builds:
# pass "frontend" as the 3rg arg to the Twig functions
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
# frontend: '%kernel.project_dir%/public/frontend/build'
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Put in config/packages/prod/webpack_encore.yaml
# cache: true
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
#when@prod:
# webpack_encore:
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# # Available in version 1.2
# cache: true
#when@test:
# webpack_encore:
# strict_mode: false

View File

@ -1,5 +0,0 @@
<?php
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}

View File

@ -1,802 +0,0 @@
#== Home ========================================================================================================
app_home:
path: /
controller: App\Controller\HomeController::home
app_user_home:
path: /user
controller: App\Controller\HomeController::homeuser
defaults: { access: user }
app_manager_home:
path: /manager
controller: App\Controller\HomeController::homemanager
defaults: { access: manager }
app_master_home:
path: /master
controller: App\Controller\HomeController::homemaster
defaults: { access: master }
app_modo_home:
path: /modo
controller: App\Controller\HomeController::homemodo
defaults: { access: modo }
app_admin_home:
path: /admin
controller: App\Controller\HomeController::homeadmin
defaults: { access: admin }
oneup_uploader:
resource: .
type: uploader
#== Security ====================================================================================================
#-- Access public
app_login:
path: /login
controller: App\Controller\SecurityController::login
app_loginldapcheck:
path: /loginldapcheck
controller: App\Controller\SecurityController::loginldapcheck
app_loginopenidcallback:
path: /oauth2/callback
controller: App\Controller\SecurityController::loginopenidcallback
app_logout:
path: /logout
controller: App\Controller\SecurityController::logout
app_noperm:
path: /noperm
controller: App\Controller\SecurityController::noperm
#== Websocket====================================================================================================
#-- Access all
app_publish_sample:
path: /all/publish/sample/{id}
controller: App\Controller\PublishController::sample
defaults: { access: all }
app_publish:
path: /all/publish/{channel}/{id}
controller: App\Controller\PublishController::publish
defaults: { access: all }
#== Config ======================================================================================================
#-- Access admin
app_admin_config:
path: /admin/config
controller: App\Controller\ConfigController::list
defaults: { access: admin }
app_admin_config_render:
path: /admin/config/render/{category}
controller: App\Controller\ConfigController::listrender
defaults: { access: admin }
app_admin_config_submit:
path: /admin/config/submit
controller: App\Controller\ConfigController::submit
defaults: { access: admin }
app_admin_config_update:
path: /admin/config/update/{id}
controller: App\Controller\ConfigController::update
defaults: { access: admin }
app_admin_config_delete:
path: /admin/config/delete/{id}
controller: App\Controller\ConfigController::delete
defaults: { access: admin }
app_admin_config_logo:
path: /admin/config/logo
controller: App\Controller\ConfigController::logo
defaults: { access: admin }
#== Theme =======================================================================================================
#-- Access admin
app_admin_theme:
path: /admin/theme
controller: App\Controller\ThemeController::list
defaults: { access: admin }
app_admin_theme_select:
path: /admin/theme/select/{name}
controller: App\Controller\ThemeController::select
defaults: { name: "", access: admin }
#== API =========================================================================================================
#-- Access public
app_rest:
path: /docrest
controller: App\Controller\HomeController::docrest
#== Cron ========================================================================================================
#-- Access admin
app_admin_cron:
path: /admin/cron
controller: App\Controller\CronController::list
defaults: { access: admin }
app_admin_cron_tablelist:
path: /admin/cron/tablelist
controller: App\Controller\CronController::tablelist
defaults: { access: admin }
app_admin_cron_update:
path: /admin/cron/update/{id}
controller: App\Controller\CronController::update
defaults: { access: admin }
app_admin_cron_exec:
path: /admin/cron/exec/{id}
controller: App\Controller\CronController::exec
defaults: { access: admin }
app_admin_log:
path: /admin/log
controller: App\Controller\CronController::log
defaults: { access: admin }
app_admin_log_get:
path: /admin/log/{id}
controller: App\Controller\CronController::get
defaults: { access: admin }
#== Crop ========================================================================================================
#-- Access all
app_all_crop01:
path: /all/crop01/{type}/{reportinput}
controller: App\Controller\CropController::crop01
app_all_crop02:
path: /all/crop02/{type}/{reportinput}
controller: App\Controller\CropController::crop02
#== Minio =======================================================================================================
#-- Access public
app_minio_logo:
path: /minio/logo
controller: App\Controller\MinioController::logo
app_minio_image:
path: /minio/image
controller: App\Controller\MinioController::image
app_minio_document:
path: /minio/document
controller: App\Controller\MinioController::document
#== Hydra =======================================================================================================
#-- Access public
app_hydra_loginsql:
path: /hydra/loginsql
controller: App\Controller\HydraController::loginsql
app_hydra_checkloginsql:
path: /hydra/checkloginsql
controller: App\Controller\HydraController::checkloginsql
app_hydra_loginldap:
path: /hydra/loginldap
controller: App\Controller\HydraController::loginldap
app_hydra_checkloginldap:
path: /hydra/checkloginldap
controller: App\Controller\HydraController::checkloginldap
app_hydra_consent:
path: /hydra/consent
controller: App\Controller\HydraController::consent
#== Ckeditor ====================================================================================================
#-- Access all
app_ckeditor_upload:
path: /all/upload
controller: App\Controller\MinioController::ckupload
defaults: { access: all }
#== Audit =======================================================================================================
#--Access admin
app_admin_audit_renderid:
path: /admin/audit/{entityname}/{entityid}
controller: App\Controller\AuditController::auditrender
defaults: { access: admin }
app_admin_audit_render:
path: /admin/audit/{entityname}
controller: App\Controller\AuditController::list
defaults: { access: admin }
#--Access modo
app_modo_audit_renderid:
path: /modo/audit/{entityname}/{entityid}
controller: App\Controller\AuditController::auditrender
defaults: { access: modo }
#== Niveau01 ====================================================================================================
#-- Access admin
app_admin_niveau01:
path: /admin/niveau01
controller: App\Controller\Niveau01Controller::list
defaults: { access: admin }
app_admin_niveau01_tablelist:
path: /admin/niveau01/tablelist
controller: App\Controller\Niveau01Controller::tablelist
defaults: { access: admin }
app_admin_niveau01_submit:
path: /admin/niveau01/submit
controller: App\Controller\Niveau01Controller::submit
defaults: { access: admin }
app_admin_niveau01_update:
path: /admin/niveau01/update/{id}
controller: App\Controller\Niveau01Controller::update
defaults: { access: admin }
app_admin_niveau01_delete:
path: /admin/niveau01/delete/{id}
controller: App\Controller\Niveau01Controller::delete
defaults: { access: admin }
#== Niveau02 ====================================================================================================
#-- Access admin
app_admin_niveau02:
path: /admin/niveau02
controller: App\Controller\Niveau02Controller::list
defaults: { access: admin }
app_admin_niveau02_tablelist:
path: /admin/niveau02/tablelist
controller: App\Controller\Niveau02Controller::tablelist
defaults: { access: admin }
app_admin_niveau02_submit:
path: /admin/niveau02/submit
controller: App\Controller\Niveau02Controller::submit
defaults: { access: admin }
app_admin_niveau02_update:
path: /admin/niveau02/update/{id}
controller: App\Controller\Niveau02Controller::update
defaults: { access: admin }
app_admin_niveau02_delete:
path: /admin/niveau02/delete/{id}
controller: App\Controller\Niveau02Controller::delete
defaults: { access: admin }
#-- Access modo
app_modo_niveau02:
path: /modo/niveau02
controller: App\Controller\Niveau02Controller::list
defaults: { access: modo }
app_modo_niveau02_tablelist:
path: /modo/niveau02/tablelist
controller: App\Controller\Niveau02Controller::tablelist
defaults: { access: modo }
app_modo_niveau02_submit:
path: /modo/niveau02/submit
controller: App\Controller\Niveau02Controller::submit
defaults: { access: modo }
app_modo_niveau02_update:
path: /modo/niveau02/update/{id}
controller: App\Controller\Niveau02Controller::update
defaults: { access: modo }
app_modo_niveau02_delete:
path: /modo/niveau02/delete/{id}
controller: App\Controller\Niveau02Controller::delete
defaults: { access: modo }
#-- Access public
app_niveau02_selectlist:
path: /niveau02/selectlist
controller: App\Controller\Niveau02Controller::selectlist
#== Niveau03 ====================================================================================================
#-- Access admin
app_admin_niveau03:
path: /admin/niveau03
controller: App\Controller\Niveau03Controller::list
defaults: { access: admin }
app_admin_niveau03_tablelist:
path: /admin/niveau03/tablelist
controller: App\Controller\Niveau03Controller::tablelist
defaults: { access: admin }
app_admin_niveau03_submit:
path: /admin/niveau03/submit
controller: App\Controller\Niveau03Controller::submit
defaults: { access: admin }
app_admin_niveau03_update:
path: /admin/niveau03/update/{id}
controller: App\Controller\Niveau03Controller::update
defaults: { access: admin }
app_admin_niveau03_delete:
path: /admin/niveau03/delete/{id}
controller: App\Controller\Niveau03Controller::delete
defaults: { access: admin }
#-- Access modo
app_modo_niveau03:
path: /modo/niveau03
controller: App\Controller\Niveau03Controller::list
defaults: { access: modo }
app_modo_niveau03_tablelist:
path: /modo/niveau03/tablelist
controller: App\Controller\Niveau03Controller::tablelist
defaults: { access: modo }
app_modo_niveau03_submit:
path: /modo/niveau03/submit
controller: App\Controller\Niveau03Controller::submit
defaults: { access: modo }
app_modo_niveau03_update:
path: /modo/niveau03/update/{id}
controller: App\Controller\Niveau03Controller::update
defaults: { access: modo }
app_modo_niveau03_delete:
path: /modo/niveau03/delete/{id}
controller: App\Controller\Niveau03Controller::delete
defaults: { access: modo }
#-- Access public
app_niveau03_selectlist:
path: /niveau03/selectlist
controller: App\Controller\Niveau03Controller::selectlist
#== Niveau04 ====================================================================================================
#-- Access admin
app_admin_niveau04:
path: /admin/niveau04
controller: App\Controller\Niveau04Controller::list
defaults: { access: admin }
app_admin_niveau04_tablelist:
path: /admin/niveau04/tablelist
controller: App\Controller\Niveau04Controller::tablelist
defaults: { access: admin }
app_admin_niveau04_submit:
path: /admin/niveau04/submit
controller: App\Controller\Niveau04Controller::submit
defaults: { access: admin }
app_admin_niveau04_update:
path: /admin/niveau04/update/{id}
controller: App\Controller\Niveau04Controller::update
defaults: { access: admin }
app_admin_niveau04_delete:
path: /admin/niveau04/delete/{id}
controller: App\Controller\Niveau04Controller::delete
defaults: { access: admin }
#-- Access modo
app_modo_niveau04:
path: /modo/niveau04
controller: App\Controller\Niveau04Controller::list
defaults: { access: modo }
app_modo_niveau04_tablelist:
path: /modo/niveau04/tablelist
controller: App\Controller\Niveau04Controller::tablelist
defaults: { access: modo }
app_modo_niveau04_submit:
path: /modo/niveau04/submit
controller: App\Controller\Niveau04Controller::submit
defaults: { access: modo }
app_modo_niveau04_update:
path: /modo/niveau04/update/{id}
controller: App\Controller\Niveau04Controller::update
defaults: { access: modo }
app_modo_niveau04_delete:
path: /modo/niveau04/delete/{id}
controller: App\Controller\Niveau04Controller::delete
defaults: { access: modo }
#-- Access public
app_niveau04_selectlist:
path: /niveau04/selectlist
controller: App\Controller\Niveau04Controller::selectlist
#== Group =======================================================================================================
#-- Access admin
app_admin_group:
path: /admin/group
controller: App\Controller\GroupController::list
defaults: { access: admin }
app_admin_group_tablelist:
path: /admin/group/tablelist
controller: App\Controller\GroupController::tablelist
defaults: { access: admin }
app_admin_group_submit:
path: /admin/group/submit
controller: App\Controller\GroupController::submit
defaults: { access: admin }
app_admin_group_update:
path: /admin/group/update/{id}
controller: App\Controller\GroupController::update
defaults: { access: admin }
app_admin_group_delete:
path: /admin/group/delete/{id}
controller: App\Controller\GroupController::delete
defaults: { access: admin }
app_admin_group_users:
path: /admin/group/users/{id}
controller: App\Controller\GroupController::users
defaults: { access: admin }
app_admin_group_usersnotin:
path: /admin/group/usersnotin/{id}
controller: App\Controller\GroupController::usersnotin
defaults: { access: admin }
app_admin_group_usersin:
path: /admin/group/usersin/{id}
controller: App\Controller\GroupController::usersin
defaults: { access: admin }
app_admin_group_usergroup_add:
path: /admin/group/usergroup/add/{groupid}/{userid}
controller: App\Controller\GroupController::useradd
defaults: { access: admin }
app_admin_group_usergroup_del:
path: /admin/group/usergroup/del/{groupid}/{userid}
controller: App\Controller\GroupController::userdel
defaults: { access: admin }
app_admin_group_usergroup_changerole:
path: /admin/group/usergroup/changerole/{groupid}/{userid}/{roleid}
controller: App\Controller\GroupController::userchangerole
defaults: { access: admin }
#-- Access modo
app_modo_group:
path: /modo/group
controller: App\Controller\GroupController::list
defaults: { access: modo }
app_modo_group_tablelist:
path: /modo/group/tablelist
controller: App\Controller\GroupController::tablelist
defaults: { access: modo }
app_modo_group_users:
path: /modo/group/users/{id}
controller: App\Controller\GroupController::users
defaults: { access: modo }
app_modo_group_usersnotin:
path: /modo/group/usersnotin/{id}
controller: App\Controller\GroupController::usersnotin
defaults: { access: modo }
app_modo_group_usersin:
path: /modo/group/usersin/{id}
controller: App\Controller\GroupController::usersin
defaults: { access: modo }
app_modo_group_usergroup_add:
path: /modo/group/usergroup/add/{groupid}/{userid}
controller: App\Controller\GroupController::useradd
defaults: { access: modo }
app_modo_group_usergroup_del:
path: /modo/group/usergroup/del/{groupid}/{userid}
controller: App\Controller\GroupController::userdel
defaults: { access: modo }
app_modo_group_usergroup_changerole:
path: /modo/group/usergroup/changerole/{groupid}/{userid}/{roleid}
controller: App\Controller\GroupController::userchangerole
defaults: { access: modo }
#-- Access all
app_all_group:
path: /all/group
controller: App\Controller\GroupController::list
defaults: { access: all }
app_all_group_tablelist:
path: /all/group/tablelist
controller: App\Controller\GroupController::tablelist
defaults: { access: all }
app_all_group_submit:
path: /all/group/submit
controller: App\Controller\GroupController::submit
defaults: { access: all }
app_all_group_update:
path: /all/group/update/{id}
controller: App\Controller\GroupController::update
defaults: { access: all }
app_all_group_delete:
path: /all/group/delete/{id}
controller: App\Controller\GroupController::delete
defaults: { access: all }
app_all_group_users:
path: /all/group/users/{id}
controller: App\Controller\GroupController::users
defaults: { access: all }
app_all_group_usersnotin:
path: /all/group/usersnotin/{id}
controller: App\Controller\GroupController::usersnotin
defaults: { access: all }
app_all_group_usersin:
path: /all/group/usersin/{id}
controller: App\Controller\GroupController::usersin
defaults: { access: all }
app_all_group_usergroup_add:
path: /all/group/usergroup/add/{groupid}/{userid}
controller: App\Controller\GroupController::useradd
defaults: { access: all }
app_all_group_usergroup_del:
path: /all/group/usergroup/del/{groupid}/{userid}
controller: App\Controller\GroupController::userdel
defaults: { access: all }
app_all_group_usergroup_changerole:
path: /all/group/usergroup/changerole/{groupid}/{userid}/{roleid}
controller: App\Controller\GroupController::userchangerole
defaults: { access: all }
app_all_group_userout:
path: /all/group/userout/{id}
controller: App\Controller\GroupController::userout
defaults: { access: all }
#== Whitelist ===================================================================================================
#-- Access admin
app_admin_whitelist:
path: /admin/whitelist
controller: App\Controller\WhitelistController::list
defaults: { access: admin }
app_admin_whitelist_tablelist:
path: /admin/whitelist/tablelist
controller: App\Controller\WhitelistController::tablelist
defaults: { access: admin }
app_admin_whitelist_submit:
path: /admin/whitelist/submit
controller: App\Controller\WhitelistController::submit
defaults: { access: admin }
app_admin_whitelist_update:
path: /admin/whitelist/update/{id}
controller: App\Controller\WhitelistController::update
defaults: { access: admin }
app_admin_whitelist_delete:
path: /admin/whitelist/delete/{id}
controller: App\Controller\WhitelistController::delete
defaults: { access: admin }
#-- Access public
app_whitelist_is:
path: /whitelist/is
controller: App\Controller\WhitelistController::is
#== Registration ================================================================================================
#-- Access admin
app_admin_registration:
path: /admin/registration
controller: App\Controller\RegistrationController::list
defaults: { access: admin }
app_admin_registration_tablelist:
path: /admin/registration/tablelist
controller: App\Controller\RegistrationController::tablelist
defaults: { access: admin }
app_admin_registration_update:
path: /admin/registration/update/{id}
controller: App\Controller\RegistrationController::update
defaults: { access: admin }
app_admin_registration_delete:
path: /admin/registration/delete/{id}
controller: App\Controller\RegistrationController::delete
defaults: { access: admin }
#-- Access modo
app_modo_registration:
path: /modo/registration
controller: App\Controller\RegistrationController::list
defaults: { access: modo }
app_modo_registration_tablelist:
path: /modo/registration/tablelist
controller: App\Controller\RegistrationController::tablelist
defaults: { access: modo }
app_modo_registration_update:
path: /modo/registration/update/{id}
controller: App\Controller\RegistrationController::update
defaults: { access: modo }
app_modo_registration_delete:
path: /modo/registration/delete/{id}
controller: App\Controller\RegistrationController::delete
defaults: { access: modo }
#-- Access public
app_registration:
path: /registration
controller: App\Controller\RegistrationController::submit
app_registration_info:
path: /registration/info
controller: App\Controller\RegistrationController::info
app_registration_validation:
path: /registration/validation/{key}
controller: App\Controller\RegistrationController::validation
app_resetpwd01:
path: /resetpwd01
controller: App\Controller\RegistrationController::resetpwd01
app_resetpwd02:
path: /resetpwd02/{key}
controller: App\Controller\RegistrationController::resetpwd02
#== User ========================================================================================================
#-- Access admin
app_admin_user:
path: /admin/user
controller: App\Controller\UserController::list
defaults: { access: admin }
app_admin_user_tablelist:
path: /admin/user/tablelist
controller: App\Controller\UserController::tablelist
defaults: { access: admin }
app_admin_user_selectlist:
path: /admin/user/selectlist
controller: App\Controller\UserController::selectlist
defaults: { access: admin }
app_admin_user_submit:
path: /admin/user/submit
controller: App\Controller\UserController::submit
defaults: { access: admin }
app_admin_user_update:
path: /admin/user/update/{id}
controller: App\Controller\UserController::update
defaults: { access: admin }
app_admin_user_delete:
path: /admin/user/delete/{id}
controller: App\Controller\UserController::delete
defaults: { access: admin }
#-- Access modo
app_modo_user:
path: /modo/user
controller: App\Controller\UserController::list
defaults: { access: modo }
app_modo_user_tablelist:
path: /modo/user/tablelist
controller: App\Controller\UserController::tablelist
defaults: { access: modo }
app_modo_user_selectlist:
path: /modo/user/selectlist
controller: App\Controller\UserController::selectlist
defaults: { access: modo }
app_modo_user_submit:
path: /modo/user/submit
controller: App\Controller\UserController::submit
defaults: { access: modo }
app_modo_user_update:
path: /modo/user/update/{id}
controller: App\Controller\UserController::update
defaults: { access: modo }
app_modo_user_delete:
path: /modo/user/delete/{id}
controller: App\Controller\UserController::delete
defaults: { access: modo }
#-- Access manager
app_manager_user:
path: /manager/user
controller: App\Controller\UserController::list
defaults: { access: manager }
app_manager_user_tablelist:
path: /manager/user/tablelist
controller: App\Controller\UserController::tablelist
defaults: { access: manager }
app_manager_user_selectlist:
path: /manager/user/selectlist
controller: App\Controller\UserController::selectlist
defaults: { access: manager }
app_manager_user_submit:
path: /manager/user/submit
controller: App\Controller\UserController::submit
defaults: { access: manager }
app_manager_user_update:
path: /manager/user/update/{id}
controller: App\Controller\UserController::update
defaults: { access: manager }
app_manager_user_delete:
path: /manager/user/delete/{id}
controller: App\Controller\UserController::delete
defaults: { access: manager }
#-- Access all
app_all_user:
path: /all/update
controller: App\Controller\UserController::profil
defaults: { access: all }
app_all_users:
path: /all/users
controller: App\Controller\UserController::list
defaults: { access: all }
app_all_user_tablelist:
path: /all/user/tablelist
controller: App\Controller\UserController::tablelist
defaults: { access: all }
app_all_user_selectlist:
path: /all/user/selectlist
controller: App\Controller\UserController::selectlist
defaults: { access: all }
app_all_view:
path: /all/view/{id}
controller: App\Controller\UserController::view
defaults: { access: all }
app_all_preference:
path: /all/preference
controller: App\Controller\UserController::preference
defaults: { access: all }

View File

@ -1,4 +0,0 @@
controllers:
resource: ../../src/Controller/RestController.php
type: annotation

View File

@ -1,4 +0,0 @@
when@dev:
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

View File

@ -1,7 +0,0 @@
# Expose your documentation as JSON swagger compliant
app_swagger_ui:
path: /rest
methods: GET
defaults: { _controller: nelmio_api_doc.controller.swagger_ui }

View File

@ -1,8 +0,0 @@
when@dev:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

View File

@ -1,277 +0,0 @@
parameters:
app_env: '%env(resolve:APP_ENV)%'
appSecret: '%env(resolve:APP_SECRET)%'
appSessiontime: '%env(resolve:APP_SESSIONTIME)%'
appWeburl: '%env(resolve:APP_WEBURL)%'
appAuth: '%env(resolve:APP_AUTH)%'
appAlias: '%env(resolve:APP_ALIAS)%'
appName: '%env(resolve:APP_NAME)%'
appMasteridentity: '%env(resolve:APP_MASTERIDENTITY)%'
appModeregistration: '%env(resolve:APP_MODEREGISTRATION)%'
appAdmins: '%env(json:APP_ADMINS)%'
appNiveau01label: '%env(resolve:APP_NIVEAU01LABEL)%'
appNiveau01labels: '%env(resolve:APP_NIVEAU01LABELS)%'
appNiveau02use: '%env(resolve:APP_NIVEAU02USE)%'
appNiveau02label: '%env(resolve:APP_NIVEAU02LABEL)%'
appNiveau02labels: '%env(resolve:APP_NIVEAU02LABELS)%'
appNiveau02mandatory: '%env(json:APP_NIVEAU02MANDATORY)%'
appNiveau03use: '%env(resolve:APP_NIVEAU03USE)%'
appNiveau03label: '%env(resolve:APP_NIVEAU03LABEL)%'
appNiveau03labels: '%env(resolve:APP_NIVEAU03LABELS)%'
appNiveau03mandatory: '%env(json:APP_NIVEAU03MANDATORY)%'
appNiveau04use: '%env(resolve:APP_NIVEAU04USE)%'
appNiveau04label: '%env(resolve:APP_NIVEAU04LABEL)%'
appNiveau04labels: '%env(resolve:APP_NIVEAU04LABELS)%'
appNiveau04mandatory: '%env(json:APP_NIVEAU04MANDATORY)%'
appNiveauupdatable: '%env(resolve:APP_NIVEAUUPDATABLE)%'
appGroupuse: '%env(resolve:APP_GROUPUSE)%'
appGroupsubmiter: '%env(json:APP_GROUPSUBMITER)%'
appAnnuscopeadmin: '%env(resolve:APP_ANNUSCOPEADMIN)%'
appAnnuscopemodo: '%env(resolve:APP_ANNUSCOPEMODO)%'
appAnnuscopemaster: '%env(resolve:APP_ANNUSCOPEMASTER)%'
appAnnuscopemanager: '%env(resolve:APP_ANNUSCOPEMANAGER)%'
appAnnuscopeuser: '%env(resolve:APP_ANNUSCOPEUSER)%'
appUserviewisvisible: '%env(resolve:APP_USERVIEWISVISIBLE)%'
appSynchro: '%env(resolve:APP_SYNCHRO)%'
appSynchroPurgeNiveau01: '%env(resolve:APP_SYNDCHROPURGENIVEAU01)%'
appSynchroPurgeNiveau02: '%env(resolve:APP_SYNDCHROPURGENIVEAU02)%'
appSynchroPurgeNiveau03: '%env(resolve:APP_SYNDCHROPURGENIVEAU03)%'
appSynchroPurgeNiveau04: '%env(resolve:APP_SYNDCHROPURGENIVEAU04)%'
appSynchroPurgeGroup: '%env(resolve:APP_SYNDCHROPURGEGROUP)%'
appSynchroPurgeUser: '%env(resolve:APP_SYNDCHROPURGEUSER)%'
databaseUrl: '%env(resolve:DATABASE_URL)%'
appMailmethod: '%env(resolve:MAILER_METHOD)%'
appMaildsn: '%env(resolve:MAILER_DSN)%'
appMailnoreply: '%env(resolve:MAILER_NOREPLY)%'
ldapHost: '%env(resolve:LDAP_HOST)%'
ldapPort: '%env(resolve:LDAP_PORT)%'
ldapUsetls: '%env(resolve:LDAP_USETLS)%'
ldapUserwriter: '%env(resolve:LDAP_USERWRITER)%'
ldapUser: '%env(resolve:LDAP_USER)%'
ldapPassword: '%env(resolve:LDAP_PASSWORD)%'
ldapBasedn: '%env(resolve:LDAP_BASEDN)%'
ldapBaseorganisation: '%env(resolve:LDAP_BASEORGANISATION)%'
ldapBaseniveau01: '%env(resolve:LDAP_BASENIVEAU01)%'
ldapBaseniveau02: '%env(resolve:LDAP_BASENIVEAU02)%'
ldapBaseniveau03: '%env(resolve:LDAP_BASENIVEAU03)%'
ldapBaseniveau04: '%env(resolve:LDAP_BASENIVEAU04)%'
ldapBasegroup: '%env(resolve:LDAP_BASEGROUP)%'
ldapBaseuser: '%env(resolve:LDAP_BASEUSER)%'
ldapUsername: '%env(resolve:LDAP_USERNAME)%'
ldapFirstname: '%env(resolve:LDAP_FIRSTNAME)%'
ldapLastname: '%env(resolve:LDAP_LASTNAME)%'
ldapEmail: '%env(resolve:LDAP_EMAIL)%'
ldapAvatar: '%env(resolve:LDAP_AVATAR)%'
ldapMemberof: '%env(resolve:LDAP_MEMBEROF)%'
ldapGroupgid: '%env(resolve:LDAP_GROUPGID)%'
ldapGroupname: '%env(resolve:LDAP_GROUPNAME)%'
ldapGroupmember: '%env(resolve:LDAP_GROUPMEMBER)%'
ldapGroupmemberisdn: '%env(resolve:LDAP_GROUPMEMBERISDN)%'
ldapFiltergroup: '%env(resolve:LDAP_FILTERGROUP)%'
ldapFilteruser: '%env(resolve:LDAP_FILTERUSER)%'
ldapAutosubmit: '%env(resolve:LDAP_AUTOSUBMIT)%'
ldapAutoupdate: '%env(resolve:LDAP_AUTOUPDATE)%'
casHost: '%env(resolve:CAS_HOST)%'
casPort: '%env(resolve:CAS_PORT)%'
casPath: '%env(resolve:CAS_PATH)%'
casUsername: '%env(resolve:CAS_USERNAME)%'
casEmail: '%env(resolve:CAS_EMAIL)%'
casLastname: '%env(resolve:CAS_LASTNAME)%'
casFirstname: '%env(resolve:CAS_FIRSTNAME)%'
casAvatar: '%env(resolve:CAS_AVATAR)%'
casNiveau01: '%env(resolve:CAS_NIVEAU01)%'
casGroup: '%env(resolve:CAS_GROUP)%'
casAutosubmit: '%env(resolve:CAS_AUTOSUBMIT)%'
casAutoupdate: '%env(resolve:CAS_AUTOUPDATE)%'
oauthClientid: '%env(resolve:OAUTH_CLIENTID)%'
oauthClientsecret: '%env(resolve:OAUTH_CLIENTSECRET)%'
oauthLoginurl: '%env(resolve:OAUTH_LOGINURL)%'
oauthLogouturl: '%env(resolve:OAUTH_LOGOUTURL)%'
oauthTokenurl: '%env(resolve:OAUTH_TOKENURL)%'
oauthUserinfo: '%env(resolve:OAUTH_USERINFO)%'
oauthUsername: '%env(resolve:OAUTH_USERNAME)%'
oauthEmail: '%env(resolve:OAUTH_EMAIL)%'
oauthLastname: '%env(resolve:OAUTH_LASTNAME)%'
oauthFirstname: '%env(resolve:OAUTH_FIRSTNAME)%'
oauthAvatar: '%env(resolve:OAUTH_AVATAR)%'
oauthNiveau01: '%env(resolve:OAUTH_NIVEAU01)%'
oauthGroup: '%env(resolve:OAUTH_GROUP)%'
oauthAutosubmit: '%env(resolve:OAUTH_AUTOSUBMIT)%'
oauthAutoupdate: '%env(resolve:OAUTH_AUTOUPDATE)%'
nineUrl: '%env(resolve:NINE_URL)%'
nineSecret: '%env(resolve:NINE_SECRET)%'
appModeregistrationterme: '%env(resolve:APP_MODEREGISTRATIONTERM)%'
proxyUse: '%env(resolve:PROXY_USE)%'
proxyHost: '%env(resolve:PROXY_HOST)%'
proxyPort: '%env(resolve:PROXY_PORT)%'
minioUrl: '%env(resolve:MINIO_URL)%'
minioKey: '%env(resolve:MINIO_KEY)%'
minioSecret: '%env(resolve:MINIO_SECRET)%'
minioBucket: '%env(resolve:MINIO_BUCKET)%'
minioRoot: '%env(resolve:MINIO_ROOT)%'
minioPathstyle: '%env(resolve:MINIO_PATH_STYLE)%'
minioSecure: '%env(resolve:MINIO_SECURE)%'
hydraLoginchallenge: '%env(resolve:HYDRA_LOGINCHALLENGE)%'
hydraLoginchallengeaccept: '%env(resolve:HYDRA_LOGINCHALLENGEACCEPT)%'
hydraConsentchallenge: '%env(resolve:HYDRA_CONSENTCHALLENGE)%'
hydraConsentchallengeaccept: '%env(resolve:HYDRA_CONSENTCHALLENGEACCEPT)%'
sondeUse: '%env(resolve:SONDE_USE)%'
sondeUrl: '%env(resolve:SONDE_URL)%'
auditUse: '%env(resolve:AUDIT_USE)%'
services:
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
Redis:
class: Predis\Client
arguments:
-
-
scheme: 'tcp'
host: '%env(resolve:REDIS_HOST)%'
port: '%env(resolve:REDIS_PORT)%'
-
replication: 'sentinel'
service: '%env(resolve:REDIS_SERVICE)%'
connection_timeout: 100
read_write_timeout: 300
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler:
arguments:
- '@Redis'
App\EventListener\AllSubscriber:
public: true
tags:
- name: 'doctrine.event_subscriber'
App\EventListener\Niveau01Subscriber:
public: true
arguments: ['@doctrine.orm.entity_manager','@App\Service\LdapService']
tags:
- name: 'doctrine.event_subscriber'
App\EventListener\Niveau02Subscriber:
public: true
arguments: ['@doctrine.orm.entity_manager','@App\Service\LdapService']
tags:
- name: 'doctrine.event_subscriber'
App\EventListener\GroupSubscriber:
public: true
arguments: ['@doctrine.orm.entity_manager','@App\Service\LdapService']
tags:
- name: 'doctrine.event_subscriber'
App\EventListener\UserSubscriber:
public: true
arguments: ['@doctrine.orm.entity_manager','@App\Service\LdapService']
tags:
- name: 'doctrine.event_subscriber'
App\EventListener\UserGroupSubscriber:
public: true
arguments: ['@doctrine.orm.entity_manager','@App\Service\LdapService']
tags:
- name: 'doctrine.event_subscriber'
App\Entity\User:
public: true
arguments: ['@security.password_hasher']
App\Command\InitCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager']
App\Command\SetPasswordCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager']
App\Command\CronCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager']
App\Command\CleanCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager']
App\Command\CleanRegistrationCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager']
App\Command\SynchroCommand:
public: true
arguments: ['@service_container','@doctrine.orm.entity_manager','@App\Service\LdapService']
App\Twig\AppExtension:
calls:
- [setContainer, ["@service_container"]]
tags:
- { name: twig.extension }
App\Service\AppSession:
public: true
arguments: ["@service_container","@doctrine.orm.entity_manager","@request_stack","@security.token_storage"]
tags:
- { name: kernel.event_listener, event: kernel.request, method: onDomainParse }
App\Service\UploadListener:
public: true
arguments: ["@doctrine.orm.entity_manager"]
tags:
- { name: kernel.event_listener, event: oneup_uploader.post_persist, method: onUpload }
App\Service\LdapService:
public: true
arguments: ["@service_container"]
App\Service\MailService:
public: true
arguments: ["@mailer", "@twig"]
App\Service\ApiService:
public: true
App\Service\MinioService:
public: true
arguments: ["%kernel.project_dir%","%minioUrl%","%minioKey%","%minioSecret%","%minioBucket%","%minioRoot%","%minioPathstyle%","%minioSecure%","%kernel.environment%"]
App\Controller\RestController:
public: true

View File

@ -0,0 +1,5 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE DATABASE nineskeletor DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

231
dicos/90_nineskeletor.xml Normal file
View File

@ -0,0 +1,231 @@
<?xml version="1.0" encoding="utf-8"?>
<creole>
<files>
<file filelist='nineskeletor' name='/etc/eole/eole-db.d/nineskeletor-db.yml' rm='True' mkdir='True'/>
<file filelist='nineskeletor_nginx' name='/etc/nginx/web.d/nineskeletor.conf' source='nineskeletor-nginx.conf' rm='True' mkdir='True' />
</files>
<containers>
<container name='web'>
<!--
<package>nineskeletor-apps</package>
-->
<!-- service de configuration apache -->
<service method="apache" servicelist="nineskeletor">nineskeletor</service>
<service servicelist="nineskeletor">wssnineskeletor</service>
<!-- template -->
<file filelist='nineskeletor' name='/etc/apache2/sites-available/nineskeletor' source='nineskeletor-apache.conf' />
<file filelist='nineskeletor' name='/lib/systemd/system/wssnineskeletor.service' source='nineskeletor.service'/>
<file filelist='nineskeletor' name='/var/www/html/nineskeletor/.env.local' source='nineskeletor-env.local' rm='True'/>
<file filelist='nineskeletor' name='/etc/cron.d/nineskeletor' source='nineskeletor.cron' rm='True'/>
</container>
</containers>
<variables>
<family name='nineskeletor'>
<variable name="ninegate_test_ninegate" type="oui/non" hidden='True' exists='False'><value>non</value></variable>
<variable name="activer_revprox" type="oui/non" description="Activer le reverse proxy Nginx" hidden='True' exists='False'><value>non</value></variable>
<variable name='activer_nineskeletor' type='oui/non' description='Activer Nineskeletor'>
<value>oui</value>
</variable>
<variable type='string' name='nineskeletor_mode_auth' description="Mode Authentification" mandatory='True'><value>CAS</value></variable>
<variable type='string' name='nineskeletor_masteridentity' description="Maître de l'Identité" mandatory='True'><value>Ninegate</value></variable>
<variable type='string' name='nineskeletor_urlidentity' description="URL complète de l'Identité" mandatory='True'><value>/ninegate</value></variable>
<variable type='string' name='nineskeletor_apikeyidentity' description="API Key de l'Identité" mandatory='True'><value>APIKeyNinegate</value></variable>
<!-- LDAP -->
<variable type='string' name='nineskeletor_ldaptemplate' description="Modèle d'annuaire"><value>scribe</value></variable>
<variable type='string' name='nineskeletor_ldapfiltergroup' description="Filtre LDAP des groupes (bien mettre votre filtre entre parenthèses)" mandatory='True'><value>(&amp;(ObjectClass=posixGroup)(cn=*))</value></variable>
<variable type='string' name='nineskeletor_ldapfilteruser' description="Filtre LDAP des utilisateurs (bien mettre votre filtre entre parenthèses)" mandatory='True'><value>(&amp;(ObjectClass=person)(uid=*))</value></variable>
<variable type='string' name='nineskeletor_ldapuid' description="Attribut LDAP uid" mandatory='True'><value>uid</value></variable>
<variable type='string' name='nineskeletor_ldapfirstname' description="Attribut LDAP firstname" mandatory='True'><value>givenname</value></variable>
<variable type='string' name='nineskeletor_ldaplastname' description="Attribut LDAP lastname" mandatory='True'><value>sn</value></variable>
<variable type='string' name='nineskeletor_ldapmail' description="Attribut LDAP email" mandatory='True'><value>mail</value></variable>
<!-- EMAIL -->
<variable type='string' name='nineskeletor_noreply' description='Adresse mail utilisé pour le noreply' mandatory='True' />
<variable type="oui/non" name='nineskeletor_activer_localmail' description="Utiliser le serveur d'envoi de mail local" mandatory='True'>
<value>oui</value>
</variable>
<variable type='string' name='nineskeletor_smtphost' description='Host du serveur SMTP' mandatory='True' />
<variable type='string' name='nineskeletor_smtpport' description='Port du serveur SMTP' mandatory='True' />
<variable type='string' name='nineskeletor_smtpuser' description='Compte du serveur SMTP' mandatory='True' />
<variable type='string' name='nineskeletor_smtppwd' description='Mot de passe associé du compte SMTP' mandatory='True' />
<variable type='string' name='nineskeletor_smtpencryption' description='Type Encryptage du serveur SMTP' mandatory='True' />
<variable type='string' name='nineskeletor_smtpauthmode' description='Mode Authentification du serveur SMTP' mandatory='True' />
<!-- BDD -->
<variable type='string' name='nineskeletor_db_mode' description='Serveur de bases de données à utiliser' mode='expert'/>
<variable type='string' name='nineskeletor_dbserver' description='Adresse du serveur de base de données' mode='expert'/>
<variable type='number' name='nineskeletor_dbport' description="Port d'écoute du serveur de base de données" mode='expert'/>
<variable type='string' name='nineskeletor_allow_hosts' description="Hôtes autorisés à utiliser la base de données" multi='True' mode='expert'/>
<variable type='string' name='nineskeletor_dbuser' description='Utilisateur du serveur de base de données' mode='expert'/>
<variable type='string' name='nineskeletor_dbpass' description='Fichier de mot de passe du serveur' mode='expert'/>
</family>
<separators>
<separator name="nineskeletor_ldaptemplate">Paramètres associés à l'Annuaire</separator>
<separator name="nineskeletor_noreply">Paramètres associés aux Mails</separator>
<separator name="nineskeletor_db_mode">Paramètres associés à la Base de Données</separator>
</separators>
</variables>
<constraints>
<!-- AFFICHAGE EN FONCTION DE APACHE -->
<condition name='hidden_if_in' source='activer_apache'>
<param>non</param>
<target type='filelist'>nineskeletor</target>
<target type='filelist'>nineskeletor_nginx</target>
<target type='servicelist'>nineskeletor</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE REVERSE PROXY -->
<condition name='hidden_if_in' source='activer_revprox'>
<param>non</param>
<target type='filelist'>nineskeletor_nginx</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE NINESKELETOR -->
<condition name='hidden_if_in' source='activer_nineskeletor'>
<param>non</param>
<target type='variable'>nineskeletor_masteridentity</target>
<target type='variable'>nineskeletor_urlidentity</target>
<target type='variable'>nineskeletor_apikeyidentity</target>
<target type='variable'>nineskeletor_mode_auth</target>
<target type='variable'>nineskeletor_ldaptemplate</target>
<target type='variable'>nineskeletor_noreply</target>
<target type='variable'>nineskeletor_activer_localmail</target>
<target type='variable'>nineskeletor_smtphost</target>
<target type='variable'>nineskeletor_smtpport</target>
<target type='variable'>nineskeletor_smtpuser</target>
<target type='variable'>nineskeletor_smtppwd</target>
<target type='variable'>nineskeletor_smtpencryption</target>
<target type='variable'>nineskeletor_smtpauthmode</target>
<target type='variable'>nineskeletor_db_mode</target>
<target type='variable'>nineskeletor_dbserver</target>
<target type='variable'>nineskeletor_dbport</target>
<target type='variable'>nineskeletor_allow_hosts</target>
<target type='variable'>nineskeletor_dbuser</target>
<target type='variable'>nineskeletor_dbpass</target>
<target type='filelist'>nineskeletor</target>
<target type='filelist'>nineskeletor_nginx</target>
<target type='servicelist'>nineskeletor</target>
</condition>
<!-- AFFICHAGE EN FONCTION DE NINEGATE -->
<fill name='calc_multi_condition' target='nineskeletor_masteridentity'>
<param>oui</param>
<param type='eole' name='condition_1' hidden='False'>ninegate_test_ninegate</param>
<param name='match'>Ninegate</param>
<param name='mismatch'>LDAP</param>
<param name='default_mismatch'>LDAP</param>
</fill>
<!-- AFFICHAGE EN FONCTION DU MASTERIDENTITY -->
<condition name='hidden_if_in' source='nineskeletor_masteridentity'>
<param>LDAP</param>
<target type='variable'>nineskeletor_urlidentity</target>
<target type='variable'>nineskeletor_apikeyidentity</target>
</condition>
<condition name='hidden_if_in' source='nineskeletor_masteridentity'>
<param>Ninegate</param>
<target type='variable'>nineskeletor_ldaptemplate</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU LDAP -->
<condition name='hidden_if_in' source='nineskeletor_ldaptemplate'>
<param>scribe</param>
<target type='variable'>nineskeletor_ldapfiltergroup</target>
<target type='variable'>nineskeletor_ldapfilteruser</target>
<target type='variable'>nineskeletor_ldapuid</target>
<target type='variable'>nineskeletor_ldapfirstname</target>
<target type='variable'>nineskeletor_ldaplastname</target>
<target type='variable'>nineskeletor_ldapmail</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MAIL -->
<fill name='concat' target='nineskeletor_noreply'>
<param>noreply@</param>
<param type='eole'>domaine_messagerie_etab</param>
</fill>
<condition name='hidden_if_in' source='nineskeletor_activer_localmail'>
<param>oui</param>
<target type='variable'>nineskeletor_smtphost</target>
<target type='variable'>nineskeletor_smtpport</target>
<target type='variable'>nineskeletor_smtpuser</target>
<target type='variable'>nineskeletor_smtppwd</target>
<target type='variable'>nineskeletor_smtpencryption</target>
<target type='variable'>nineskeletor_smtpauthmode</target>
</condition>
<!-- AFFICHAGE EN FONCTION DU MODE DE BDD -->
<condition name='disabled_if_in' source='nineskeletor_db_mode'>
<param>local</param>
<target type='variable'>nineskeletor_dbserver</target>
<target type='variable'>nineskeletor_dbuser</target>
<target type='variable'>nineskeletor_dbport</target>
<target type='variable'>nineskeletor_dbpass</target>
</condition>
<condition name='disabled_if_in' source='nineskeletor_db_mode'>
<param>default</param>
<target type='variable'>nineskeletor_dbserver</target>
<target type='variable'>nineskeletor_dbuser</target>
<target type='variable'>nineskeletor_dbport</target>
<target type='variable'>nineskeletor_dbpass</target>
<target type='variable'>nineskeletor_allow_hosts</target>
</condition>
<!-- VALID EMUN DES DIFFRENTES COMBO -->
<check name='valid_enum' target='nineskeletor_masteridentity'>
<param>['LDAP','Ninegate']</param>
</check>
<check name='valid_enum' target='nineskeletor_mode_auth'>
<param>['CAS', 'LDAP', 'SQL']</param>
</check>
<check name='valid_enum' target='nineskeletor_ldaptemplate'>
<param>['scribe','open']</param>
</check>
<check name='valid_enum' target='nineskeletor_smtpencryption'>
<param>['tls', 'ssl', 'null']</param>
</check>
<check name='valid_enum' target='nineskeletor_smtpauthmode'>
<param>['plain', 'login', 'cram-md5', 'null']</param>
</check>
<check name='valid_enum' target='nineskeletor_db_mode'>
<param>['default', 'externe', 'local']</param>
</check>
</constraints>
<help>
<variable name='activer_nineskeletor'>Skelete application Nine</variable>
</help>
</creole>

View File

@ -1,305 +0,0 @@
version: '3'
# Port
# 6379 = redis
# 5432 = postgres
# 80 = mercure
# 9000 = minio nginx
# 1025 = fake smtp
# 1080 = fake webmail
# 389 = fake ldap
# 636 = fake ldaps
# 6080 = tool phpldapadmin
# 6081 = tool adminer
services:
# Service redis
redis-master:
image: redis:6-alpine
container_name: nineskeletor-redismaster
volumes:
- "./.data:/data:rw"
ports:
- "6379:6379"
redis-slave:
image: redis:6-alpine
container_name: nineskeletor-redisslave
command: redis-server --slaveof redis-master 6379
links:
- redis-master
volumes:
- "./.data:/data:rw"
redis-sentinel:
container_name: nineskeletor-redissentinel
build:
context: ./misc/images/redis-sentinel
links:
- redis-master
# Service postgres pour le stockage de la bdd applicative
postgres:
image: postgres:13-alpine
container_name: nineskeletor-postgres
hostname: nineskeletor-postgres
environment:
POSTGRES_MULTIPLE_DATABASES: app,hydra
POSTGRES_PASSWORD: changeme
POSTGRES_USER: symfony
ports:
- 5432:5432
volumes:
- db-data:/var/lib/postgres/data:rw
- ./misc/images/postgres:/docker-entrypoint-initdb.d
# Service app
app:
build:
context: .
dockerfile: ./misc/images/app/app-docker/Dockerfile
container_name: nineskeletor-app
ports:
- ${APP_HTTP_PORT:-8080}:8080
links:
- postgres
- hydra
- redis-sentinel
depends_on:
- postgres
- hydra
volumes:
- ./src:/app/src:delegated
- ./public:/app/public:delegated
- ./templates:/app/templates:delegated
- ./translations:/app/translations:delegated
- ./tests:/app/tests:delegated
- ./config:/app/config:delegated
- ./.env:/app/.env:delegated
environment:
PHP_FPM_MEMORY_LIMIT: 128m
APP_ENV: dev
# Service websocket
mercure:
image: dunglas/mercure
container_name: nineskeletor-mercure
restart: unless-stopped
ports:
- "8081:80"
environment:
SERVER_NAME: ':80'
MERCURE_PUBLISHER_JWT_KEY: '!changeme!changeme!changeme!changeme!changeme!changeme!'
MERCURE_SUBSCRIBER_JWT_KEY: '!changeme!changeme!changeme!changeme!changeme!changeme!'
MERCURE_EXTRA_DIRECTIVES: |
cors_origins "http://localhost:8080"
anonymous
# Comment the following line to disable the development mode
#command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
volumes:
- mercure_data:/data
- mercure_config:/config
# Service de stockage Minio
minio1:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
container_name: nineskeletor-minio1
volumes:
- data1-1:/data1
- data1-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Service de stockage Minio
minio2:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
container_name: nineskeletor-minio2
volumes:
- data2-1:/data1
- data2-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Service de stockage Minio
minio3:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
container_name: nineskeletor-minio3
volumes:
- data3-1:/data1
- data3-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Service de stockage Minio
minio4:
image: minio/minio:RELEASE.2021-01-16T02-19-44Z
container_name: nineskeletor-minio4
volumes:
- data4-1:/data1
- data4-2:/data2
expose:
- "9000"
environment:
MINIO_ROOT_USER: minio
MINIO_ROOT_PASSWORD: changeme
command: server http://minio{1...4}/data{1...2}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
# Service nginx orchestrateur des minio
nginx:
image: nginx:1.19.2-alpine
container_name: nineskeletor-nginx
volumes:
- ./misc/images/minio/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "9000:9000"
depends_on:
- minio1
- minio2
- minio3
- minio4
# Service hydra
hydra:
image: cadoles/hydra-v1
container_name: nineskeletor-hydra
volumes:
- ./misc/images/hydra/clients.d:/etc/hydra/clients.d
ports:
- 7080:4444
- 4445:4445
links:
- postgres
depends_on:
- postgres
restart: on-failure
environment:
LOG_LEAK_SENSITIVE_VALUES: "true"
HYDRA_URLS_SELF_ISSUER: http://localhost:7080
HYDRA_URLS_CONSENT: http://localhost:7081/consent
HYDRA_URLS_LOGIN: http://localhost:7081/login
HYDRA_URLS_LOGOUT: http://localhost:7081/logout
HYDRA_DSN: postgres://symfony:changeme@postgres:5432/hydra
#HYDRA_WAIT4X_DATABASE_TYPE: postgres
#HYDRA_WAIT4X_DATABASE_DSN: postgres://symfony:changeme@postgres:5432/hydra
HYDRA_ALLOW_INSECURE: "yes"
HYDRA_LEVEL: debug
hydra-dispatcher:
build:
context: ./misc/images/hydra-dispatcher
container_name: nineskeletor-hydra-dispatcher
links:
- hydra
ports:
- 7081:80
restart: on-failure
environment:
- APP_ENV=dev
- APP_DEBUG=yes
- HYDRA_BASE_URL=http://hydra:4444
- HYDRA_ADMIN_BASE_URL=http://hydra:4445
# url dispatcher
- BASE_URL=http://localhost:7081
- COOKIE_PATH=/
- DEFAULT_LOCALE=fr
- APP_LOCALES=fr,en
volumes:
- ./misc/images/hydra-dispatcher/hydra:/var/www/config/hydra:ro
- ./misc/images/hydra-dispatcher/templates:/var/www/templates
- ./misc/images/hydra-dispatcher/theme.css:/var/www/public/build/theme/theme.css
# Service fake smtp = optionnel
mailer:
image: schickling/mailcatcher
container_name: nineskeletor-mailer
ports:
- 1025:1025
- 1080:1080
# Service fake openldap = optionnel si nineskeletor a une synchronisation avec un annuaire
openldap:
image: osixia/openldap:1.5.0
container_name: nineskeletor-openldap
environment:
LDAP_LOG_LEVEL: "256"
LDAP_ORGANISATION: "nine"
LDAP_DOMAIN: "nine.fr"
LDAP_ADMIN_PASSWORD: "changeme"
LDAP_CONFIG_PASSWORD: "changeme"
LDAP_READONLY_USER: "true"
LDAP_READONLY_USER_USERNAME: "readonly"
LDAP_READONLY_USER_PASSWORD: "readonly"
LDAP_TLS: "false"
volumes:
- /var/lib/ldap
- /etc/ldap/slapd.d
- /container/service/slapd/assets/certs/
ports:
- "389:389"
- "636:636"
# Service tool phpldapadmin = optionnel dans le cas de la présence d'un fake openldap
phpldapadmin:
image: osixia/phpldapadmin:latest
container_name: nineskeletor-phpldapadmin
environment:
PHPLDAPADMIN_LDAP_HOSTS: "openldap"
PHPLDAPADMIN_HTTPS: "false"
ports:
- "6080:80"
depends_on:
- openldap
# Service tool adminer = optionnel
adminer:
image: adminer
container_name: nineskeletor-adminer
restart: always
ports:
- 6081:8080
volumes:
db-data:
mercure_data:
mercure_config:
data1-1:
data1-2:
data2-1:
data2-2:
data3-1:
data3-2:
data4-1:
data4-2:

231
eole.mk Normal file
View File

@ -0,0 +1,231 @@
#
# NE PAS EDITER CE FICHIER
#
# Utiliser <appli>.mk à inclure à la fin de Makefile
#################
# Sanity checks #
#################
ifeq (, $(DESTDIR))
$(warning $$(DESTDIR) is empty, installation will be done in /)
endif
ifeq (, $(filter-out XXX-XXX, $(strip $(SOURCE))))
$(error $$(SOURCE) variable has incorrect value '$(SOURCE)')
endif
ifeq (, $(filter-out 2.X, $(strip $(EOLE_VERSION))))
$(error $$(EOLE_VERSION) variable has incorrect value '$(EOLE_VERSION)')
endif
ifeq (, $(filter-out 2.X.Y, $(strip $(EOLE_RELEASE))))
$(error $$(EOLE_RELEASE) variable has incorrect value '$(EOLE_RELEASE)')
endif
#########################
# Variables definitions #
#########################
INSTALL := install
INSTALL_DATA := install -m 644
INSTALL_PROGRAM := install -m 755
INSTALL_DIRECTORY := install -m 755 -d
INSTALL_RECURSIVE := cp -dr --no-preserve=ownership
# Standard path
bin_PROG_DIR := $(DESTDIR)/usr/bin
sbin_PROG_DIR := $(DESTDIR)/usr/sbin
man8_DATA_DIR := $(DESTDIR)/usr/share/man/fr.UTF-8/man8
# Base
eole_DIR := $(DESTDIR)/usr/share/eole
ifeq ($(strip $(EOLE_VERSION)), 2.3)
diagnose_PROG_DIR := $(eole_DIR)/diagnose/module
else
diagnose_PROG_DIR := $(eole_DIR)/diagnose/
endif
# Creole
creole_DIR := $(eole_DIR)/creole
dicos_DATA_DIR := $(creole_DIR)/dicos
tmpl_DATA_DIR := $(creole_DIR)/distrib
preservice_PROG_DIR := $(eole_DIR)/preservice
pretemplate_PROG_DIR := $(eole_DIR)/pretemplate
posttemplate_PROG_DIR := $(eole_DIR)/posttemplate
postservice_PROG_DIR := $(eole_DIR)/postservice
ifeq ($(strip $(EOLE_VERSION)), 2.3)
firewall_DATA_DIR := $(eole_DIR)/firewall
endif
bacula_restore_DATA_DIR := $(eole_DIR)/bacula/restore
bareos_restore_DATA_DIR := $(eole_DIR)/bareos/restore
bacula_fichier_DATA_DIR := $(DESTDIR)/etc/bacula/baculafichiers.d
bareos_fichier_DATA_DIR := $(DESTDIR)/etc/bareos/bareosfichiers.d
ifeq ($(strip $(EOLE_VERSION)), 2.3)
schedule_pre_PROG_DIR := $(eole_DIR)/schedule/pre
schedule_post_PROG_DIR := $(eole_DIR)/schedule/post
else
schedule_scripts_PROG_DIR := $(eole_DIR)/schedule/scripts
endif
extra_REC_DIR := $(creole_DIR)/extra
# Zéphir
zephir_DATA_DIR := $(DESTDIR)/usr/share/zephir
zephir_configs_DATA_DIR := $(zephir_DATA_DIR)/monitor/configs
zephir_srv_DATA_DIR := $(zephir_configs_DATA_DIR)/services
zephir_scripts_PROG_DIR := $(zephir_DATA_DIR)/scripts
# SSO
sso_DATA_DIR := $(DESTDIR)/usr/share/sso
sso_filtres_DATA_DIR := $(sso_DATA_DIR)/app_filters
sso_user-info_DATA_DIR := $(sso_DATA_DIR)/user_infos
# EAD
ead_DATA_DIR := $(DESTDIR)/usr/share/ead2/backend/config
ead_actions_DATA_DIR := $(ead_DATA_DIR)/actions
ead_perms_DATA_DIR := $(ead_DATA_DIR)/perms
ead_roles_DATA_DIR := $(ead_DATA_DIR)/roles
# Program libraries goes under /usr/lib/<PROGRAM>/
lib_$(SOURCE)_DATA_DIR := $(DESTDIR)/usr/lib/$(SOURCE)
# Scripts Eole
scripts_PROG_DIR := $(eole_DIR)/sbin
lib_eole_DATA_DIR := $(DESTDIR)/usr/lib/eole
# LDAP
ldap_passwords_DATA_DIR := $(eole_DIR)/annuaire/password_files
# LXC
lxc_DATA_DIR := $(eole_DIR)/lxc
lxc_fstab_DATA_DIR := $(lxc_DATA_DIR)/fstab
lxc_hosts_DATA_DIR := $(lxc_DATA_DIR)/hosts
# SQL
sql_DATA_DIR := $(eole_DIR)/mysql/$(SOURCE)
sql_gen_DATA_DIR := $(sql_DATA_DIR)/gen
sql_updates_DATA_DIR := $(sql_DATA_DIR)/updates
sql_conf_gen_DATA_DIR := $(eole_DIR)/applications/gen
sql_conf_passwords_DATA_DIR := $(eole_DIR)/applications/passwords
sql_conf_updates_DATA_DIR := $(eole_DIR)/applications/updates/$(SOURCE)
# EoleDB sql directory
db_DIR := $(eole_DIR)/db
db_gen_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/gen
db_updates_DATA_DIR := $(eole_DIR)/db/$(SOURCE)/updates
# Certifs
certs_DATA_DIR := $(eole_DIR)/certs
# Logrotate
logrotate_DATA_DIR := $(DESTDIR)/etc/logrotate.d
# Cron
cron_PROG_DIR := $(DESTDIR)/etc/cron.daily
# Python modules
ifneq ($(DESTDIR),)
PYTHON_OPTS := --root $(DESTDIR)
endif
# Translation
TRANSLATION_SRC := translation
TRANSLATION_DEST := $(DESTDIR)/usr/share/locale
PO_FILES = $(wildcard $(TRANSLATION_SRC)/*/*.po)
MO_FOLDERS = $(addprefix $(TRANSLATION_DEST), $(addsuffix LC_MESSAGES,$(subst $(TRANSLATION_SRC),,$(dir $(PO_FILES)))))
#############################################
# Common directories and files installation #
#############################################
all:
$(MO_FOLDERS):
$(INSTALL_DIRECTORY) $@
$(PO_FILES): $(MO_FOLDERS)
msgfmt -o $(TRANSLATION_DEST)$(subst $(TRANSLATION_SRC),,$(addsuffix LC_MESSAGES,$(dir $@)))/$(notdir $(@:.po=.mo)) $@
install-lang: $(PO_FILES)
install:: install-dirs install-files install-lang
# $1 = command to run
# $2 = source directory
# $3 = destination directory
define fc_install_file
if [ -d $2 ]; then \
for file in `ls -1 $2/`; do \
$1 $2/$$file $3 || true; \
done; \
fi
endef
##
## Directory creation
##
# use % to catch local name in $*
# data, program and recursive directory require a corresponding
# directory in local sources
%_DATA_DIR %_PROG_DIR %REC_DIR:
test ! -d $(subst _,/,$*) || $(INSTALL_DIRECTORY) $($@)
# Create the directory referenced by the variable without a local one.
%_DIR:
@: # do nothing
##
## Install files present directly under data, program and recursive directories
##
# $* : name of variable
# $($*): value of variable
%-instdata:
$(call fc_install_file, $(INSTALL_DATA), $(subst _,/,$(subst _DATA_DIR,,$*)), $($*))
%-instprog:
$(call fc_install_file, $(INSTALL_PROGRAM), $(subst _,/,$(subst _PROG_DIR,,$*)), $($*))
%-instrec:
$(call fc_install_file, $(INSTALL_RECURSIVE), $(subst _,/,$(subst _REC_DIR,,$*)), $($*))
# Use second expansion as variables may be created in included
# Makefiles
.SECONDEXPANSION:
# List of all directories
installdirs_LIST = $(foreach V, $(filter %_DIR, $(.VARIABLES)), \
$(if $(filter file, $(origin $(V))), \
$(V)))
# List of data directories
installdata_LIST = $(filter %_DATA_DIR, $(installdirs_LIST))
# List of program directories
installprog_LIST = $(filter %_PROG_DIR, $(installdirs_LIST))
# List of recursive directories
installrec_LIST = $(filter %_REC_DIR, $(installdirs_LIST))
# Expand directories to create as dependency
# Use double-colon to permit user to define additionnal install-dirs
install-dirs:: $$(installdirs_LIST)
# Expand files to install as dependency
# Use double-colon to permit user to define additionnal install-files
install-files:: install-data-files install-prog-files install-rec-dirs
install-data-files: $$(patsubst %,%-instdata,$$(installdata_LIST))
install-prog-files: $$(patsubst %,%-instprog,$$(installprog_LIST))
install-rec-dirs: $$(patsubst %,%-instrec,$$(installrec_LIST))
# Installation of python modules
ifeq ($(shell test -f setup.py && echo 0), 0)
install-files::
python setup.py install --no-compile --install-layout=deb $(PYTHON_OPTS)
endif
.PHONY: install install-dirs install-files install-data-files install-prog-files install-rec-dirs

13
logrotate/nineskeletor Normal file
View File

@ -0,0 +1,13 @@
/var/www/html/nineskeletor/var/log/*.log {
su root www-data
daily
rotate 7
size 900
maxage 7
compress
dateext
dateformat -%Y%m%d
missingok
create 644 www-data www-data
}

View File

@ -1,156 +0,0 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20221002124137 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SEQUENCE audit_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE cron_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE groupe_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau01_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau02_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau03_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE niveau04_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE registration_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE useraccount_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE usergroupe_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE usermodo_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE SEQUENCE whitelist_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
$this->addSql('CREATE TABLE audit (id INT NOT NULL, entityname VARCHAR(250) NOT NULL, entityid VARCHAR(250) NOT NULL, datesubmit TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, username VARCHAR(250) NOT NULL, description TEXT DEFAULT NULL, detail TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX search_idx ON audit (entityname, entityid, datesubmit)');
$this->addSql('COMMENT ON COLUMN audit.detail IS \'(DC2Type:array)\'');
$this->addSql('CREATE TABLE config (id VARCHAR(255) NOT NULL, title VARCHAR(250) NOT NULL, value TEXT DEFAULT NULL, defaultvalue TEXT NOT NULL, roworder VARCHAR(255) NOT NULL, visible BOOLEAN NOT NULL, changeable BOOLEAN NOT NULL, required BOOLEAN NOT NULL, type VARCHAR(255) NOT NULL, grouped VARCHAR(255) NOT NULL, category VARCHAR(255) NOT NULL, help TEXT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE cron (id INT NOT NULL, command VARCHAR(255) NOT NULL, description TEXT DEFAULT NULL, statut INT DEFAULT NULL, submitdate TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, startexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, endexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, nextexecdate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, repeatinterval INT DEFAULT NULL, jsonargument TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE TABLE groupe (id INT NOT NULL, owner_id INT DEFAULT NULL, label VARCHAR(250) NOT NULL, description TEXT DEFAULT NULL, email VARCHAR(250) DEFAULT NULL, isopen BOOLEAN DEFAULT false NOT NULL, isworkgroup BOOLEAN DEFAULT false NOT NULL, apikey VARCHAR(255) NOT NULL, ldapfilter TEXT DEFAULT NULL, attributes TEXT DEFAULT NULL, idexternal TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_4B98C21EA750E8 ON groupe (label)');
$this->addSql('CREATE INDEX IDX_4B98C217E3C61F9 ON groupe (owner_id)');
$this->addSql('CREATE TABLE niveau01 (id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, ldapfilter TEXT DEFAULT NULL, attributes TEXT DEFAULT NULL, idexternal TEXT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6DFC7E23EA750E8 ON niveau01 (label)');
$this->addSql('CREATE TABLE niveau02 (id INT NOT NULL, niveau01_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_F4F52F99EA750E8 ON niveau02 (label)');
$this->addSql('CREATE INDEX IDX_F4F52F9959FDD7AB ON niveau02 (niveau01_id)');
$this->addSql('CREATE TABLE niveau03 (id INT NOT NULL, niveau02_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_83F21F0FEA750E8 ON niveau03 (label)');
$this->addSql('CREATE INDEX IDX_83F21F0F4B487845 ON niveau03 (niveau02_id)');
$this->addSql('CREATE TABLE niveau04 (id INT NOT NULL, niveau03_id INT NOT NULL, label VARCHAR(250) NOT NULL, code TEXT DEFAULT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, email VARCHAR(60) DEFAULT NULL, apikey VARCHAR(255) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D968AACEA750E8 ON niveau04 (label)');
$this->addSql('CREATE INDEX IDX_1D968AACF3F41F20 ON niveau04 (niveau03_id)');
$this->addSql('CREATE TABLE registration (id INT NOT NULL, niveau01_id INT NOT NULL, niveau02_id INT DEFAULT NULL, niveau03_id INT DEFAULT NULL, niveau04_id INT DEFAULT NULL, username VARCHAR(128) NOT NULL, firstname VARCHAR(250) DEFAULT NULL, lastname VARCHAR(250) DEFAULT NULL, password VARCHAR(250) NOT NULL, salt VARCHAR(250) NOT NULL, email VARCHAR(128) NOT NULL, isvisible BOOLEAN NOT NULL, postaladress VARCHAR(250) DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, job VARCHAR(250) DEFAULT NULL, position VARCHAR(250) DEFAULT NULL, motivation TEXT DEFAULT NULL, note TEXT DEFAULT NULL, keyexpire TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, keyvalue VARCHAR(60) DEFAULT NULL, statut INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_62A8A7A7F85E0677 ON registration (username)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_62A8A7A7E7927C74 ON registration (email)');
$this->addSql('CREATE INDEX IDX_62A8A7A759FDD7AB ON registration (niveau01_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A74B487845 ON registration (niveau02_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A7F3F41F20 ON registration (niveau03_id)');
$this->addSql('CREATE INDEX IDX_62A8A7A76E232799 ON registration (niveau04_id)');
$this->addSql('CREATE TABLE useraccount (id INT NOT NULL, niveau01_id INT NOT NULL, niveau02_id INT DEFAULT NULL, niveau03_id INT DEFAULT NULL, niveau04_id INT DEFAULT NULL, username VARCHAR(128) NOT NULL, apikey VARCHAR(255) NOT NULL, firstname VARCHAR(250) DEFAULT NULL, lastname VARCHAR(250) DEFAULT NULL, roles TEXT NOT NULL, password VARCHAR(250) NOT NULL, salt VARCHAR(250) NOT NULL, isactive BOOLEAN NOT NULL, email VARCHAR(128) NOT NULL, avatar VARCHAR(250) DEFAULT \'0\', isvisible BOOLEAN NOT NULL, postaladress TEXT DEFAULT NULL, telephonenumber VARCHAR(60) DEFAULT NULL, job VARCHAR(250) DEFAULT NULL, position VARCHAR(250) DEFAULT NULL, motivation TEXT DEFAULT NULL, note TEXT DEFAULT NULL, preference TEXT DEFAULT NULL, keyexpire TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, keyvalue VARCHAR(60) DEFAULT NULL, visitedate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, visitecpt INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_E157AA1AF85E0677 ON useraccount (username)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_E157AA1AE7927C74 ON useraccount (email)');
$this->addSql('CREATE INDEX IDX_E157AA1A59FDD7AB ON useraccount (niveau01_id)');
$this->addSql('CREATE INDEX IDX_E157AA1A4B487845 ON useraccount (niveau02_id)');
$this->addSql('CREATE INDEX IDX_E157AA1AF3F41F20 ON useraccount (niveau03_id)');
$this->addSql('CREATE INDEX IDX_E157AA1A6E232799 ON useraccount (niveau04_id)');
$this->addSql('COMMENT ON COLUMN useraccount.roles IS \'(DC2Type:array)\'');
$this->addSql('COMMENT ON COLUMN useraccount.preference IS \'(DC2Type:array)\'');
$this->addSql('CREATE TABLE usergroupe (id INT NOT NULL, user_id INT DEFAULT NULL, group_id INT DEFAULT NULL, rolegroup INT NOT NULL, apikey VARCHAR(60) NOT NULL, visitedate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, visitecpt INT DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_6C439BE5A76ED395 ON usergroupe (user_id)');
$this->addSql('CREATE INDEX IDX_6C439BE5FE54D947 ON usergroupe (group_id)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_6C439BE5A76ED395FE54D947 ON usergroupe (user_id, group_id)');
$this->addSql('CREATE TABLE usermodo (id INT NOT NULL, user_id INT NOT NULL, niveau01_id INT NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_D162D6C4A76ED395 ON usermodo (user_id)');
$this->addSql('CREATE INDEX IDX_D162D6C459FDD7AB ON usermodo (niveau01_id)');
$this->addSql('CREATE TABLE whitelist (id INT NOT NULL, label VARCHAR(250) NOT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE UNIQUE INDEX UNIQ_CB069864EA750E8 ON whitelist (label)');
$this->addSql('CREATE TABLE messenger_messages (id BIGSERIAL NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY(id))');
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0 ON messenger_messages (queue_name)');
$this->addSql('CREATE INDEX IDX_75EA56E0E3BD61CE ON messenger_messages (available_at)');
$this->addSql('CREATE INDEX IDX_75EA56E016BA31DB ON messenger_messages (delivered_at)');
$this->addSql('CREATE OR REPLACE FUNCTION notify_messenger_messages() RETURNS TRIGGER AS $$
BEGIN
PERFORM pg_notify(\'messenger_messages\', NEW.queue_name::text);
RETURN NEW;
END;
$$ LANGUAGE plpgsql;');
$this->addSql('DROP TRIGGER IF EXISTS notify_trigger ON messenger_messages;');
$this->addSql('CREATE TRIGGER notify_trigger AFTER INSERT OR UPDATE ON messenger_messages FOR EACH ROW EXECUTE PROCEDURE notify_messenger_messages();');
$this->addSql('ALTER TABLE groupe ADD CONSTRAINT FK_4B98C217E3C61F9 FOREIGN KEY (owner_id) REFERENCES useraccount (id) ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau02 ADD CONSTRAINT FK_F4F52F9959FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau03 ADD CONSTRAINT FK_83F21F0F4B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE niveau04 ADD CONSTRAINT FK_1D968AACF3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A759FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A74B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A7F3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE registration ADD CONSTRAINT FK_62A8A7A76E232799 FOREIGN KEY (niveau04_id) REFERENCES niveau04 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A59FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A4B487845 FOREIGN KEY (niveau02_id) REFERENCES niveau02 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1AF3F41F20 FOREIGN KEY (niveau03_id) REFERENCES niveau03 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE useraccount ADD CONSTRAINT FK_E157AA1A6E232799 FOREIGN KEY (niveau04_id) REFERENCES niveau04 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usergroupe ADD CONSTRAINT FK_6C439BE5A76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usergroupe ADD CONSTRAINT FK_6C439BE5FE54D947 FOREIGN KEY (group_id) REFERENCES groupe (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usermodo ADD CONSTRAINT FK_D162D6C4A76ED395 FOREIGN KEY (user_id) REFERENCES useraccount (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
$this->addSql('ALTER TABLE usermodo ADD CONSTRAINT FK_D162D6C459FDD7AB FOREIGN KEY (niveau01_id) REFERENCES niveau01 (id) NOT DEFERRABLE INITIALLY IMMEDIATE');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('DROP SEQUENCE audit_id_seq CASCADE');
$this->addSql('DROP SEQUENCE cron_id_seq CASCADE');
$this->addSql('DROP SEQUENCE groupe_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau01_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau02_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau03_id_seq CASCADE');
$this->addSql('DROP SEQUENCE niveau04_id_seq CASCADE');
$this->addSql('DROP SEQUENCE registration_id_seq CASCADE');
$this->addSql('DROP SEQUENCE useraccount_id_seq CASCADE');
$this->addSql('DROP SEQUENCE usergroupe_id_seq CASCADE');
$this->addSql('DROP SEQUENCE usermodo_id_seq CASCADE');
$this->addSql('DROP SEQUENCE whitelist_id_seq CASCADE');
$this->addSql('ALTER TABLE groupe DROP CONSTRAINT FK_4B98C217E3C61F9');
$this->addSql('ALTER TABLE niveau02 DROP CONSTRAINT FK_F4F52F9959FDD7AB');
$this->addSql('ALTER TABLE niveau03 DROP CONSTRAINT FK_83F21F0F4B487845');
$this->addSql('ALTER TABLE niveau04 DROP CONSTRAINT FK_1D968AACF3F41F20');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A759FDD7AB');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A74B487845');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A7F3F41F20');
$this->addSql('ALTER TABLE registration DROP CONSTRAINT FK_62A8A7A76E232799');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A59FDD7AB');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A4B487845');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1AF3F41F20');
$this->addSql('ALTER TABLE useraccount DROP CONSTRAINT FK_E157AA1A6E232799');
$this->addSql('ALTER TABLE usergroupe DROP CONSTRAINT FK_6C439BE5A76ED395');
$this->addSql('ALTER TABLE usergroupe DROP CONSTRAINT FK_6C439BE5FE54D947');
$this->addSql('ALTER TABLE usermodo DROP CONSTRAINT FK_D162D6C4A76ED395');
$this->addSql('ALTER TABLE usermodo DROP CONSTRAINT FK_D162D6C459FDD7AB');
$this->addSql('DROP TABLE audit');
$this->addSql('DROP TABLE config');
$this->addSql('DROP TABLE cron');
$this->addSql('DROP TABLE groupe');
$this->addSql('DROP TABLE niveau01');
$this->addSql('DROP TABLE niveau02');
$this->addSql('DROP TABLE niveau03');
$this->addSql('DROP TABLE niveau04');
$this->addSql('DROP TABLE registration');
$this->addSql('DROP TABLE useraccount');
$this->addSql('DROP TABLE usergroupe');
$this->addSql('DROP TABLE usermodo');
$this->addSql('DROP TABLE whitelist');
$this->addSql('DROP TABLE messenger_messages');
}
}

View File

@ -1,12 +0,0 @@
ARG PHP_PKG_VERSION="8.1.22-r0"
ARG ADDITIONAL_PACKAGES="tree \
php81-gd=${PHP_PKG_VERSION} \
php81-sodium=${PHP_PKG_VERSION} \
php81-fileinfo=${PHP_PKG_VERSION} \
php81-pdo=${PHP_PKG_VERSION} \
php81-pdo_pgsql=${PHP_PKG_VERSION} \
php81-intl=${PHP_PKG_VERSION} \
php81-ldap=${PHP_PKG_VERSION} \
php81-pecl-redis=5.3.7-r0"
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-standalone

View File

@ -1,11 +0,0 @@
ARG PHP_PKG_VERSION="8.1.20-r0"
ARG ADDITIONAL_PACKAGES="tree \
php81-gd=${PHP_PKG_VERSION} \
php81-sodium=${PHP_PKG_VERSION} \
php81-fileinfo=${PHP_PKG_VERSION} \
php81-pdo=${PHP_PKG_VERSION} \
php81-pdo_pgsql=${PHP_PKG_VERSION} \
php81-intl=${PHP_PKG_VERSION} \
php81-pecl-redis=5.3.7-r0"
FROM reg.cadoles.com/cadoles/symfony:alpine-php-8.1-base

View File

@ -1 +0,0 @@
FROM cadoles/hydra-dispatcher-v1:v0.0.0-111-g2e60bdb

View File

@ -1,43 +0,0 @@
hydra:
apps:
- id: ninesql
title:
fr: NINE SQL
en: NINE SQL
description:
fr: Authentification via NINESQL
en: Authentication by NINESQL
icon_url: http://localhost:8080/medias/icons/icon_bdd.png
login_url: http://localhost:8080/hydra/loginsql
consent_url: http://localhost:8080/hydra/consent
logout_url: http://localhost:8080/hydra/logoutsql
attributes_rewrite_rules:
username:
- consent.session.id_token.username
email:
- consent.session.id_token.email
firstname:
- consent.session.id_token.firstname
lastname:
- consent.session.id_token.lastname
- id: nineldap
title:
fr: NINE LDAP
en: NINE LDAP
description:
fr: Authentification via NINELDAP
en: Authentication by NINELDAP
icon_url: http://localhost:8080/medias/icons/icon_phpldapadmin.png
login_url: http://localhost:8080/hydra/loginldap
consent_url: http://localhost:8080/hydra/consent
logout_url: http://localhost:8080/hydra/logoutldap
attributes_rewrite_rules:
username:
- consent.session.id_token.username
email:
- consent.session.id_token.email
firstname:
- consent.session.id_token.firstname
lastname:
- consent.session.id_token.lastname

View File

@ -1,23 +0,0 @@
<!DOCTYPE html>
<html>
<head>
{% block head %}
<title>{% block title %}{{ 'view.base.title'|trans({}, 'view', app.request.session.get('_locale')) }}{% endblock %}</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block stylesheets %}
{{ encore_entry_link_tags('app', null, 'appConfig') }}
{{ encore_entry_link_tags('theme', null, 'themeConfig') }}
{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}
{% block body_content %}{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app', null, 'appConfig') }}
{{ encore_entry_script_tags('theme', null, 'themeConfig') }}
{% endblock %}
{% endblock %}
</body>
</html>

View File

@ -1,16 +0,0 @@
{% extends 'base.html.twig' %}
{% block stylesheets %}
{{ parent() }}
{% endblock %}
{% block title %}{{ 'view.error.title'|trans({}, 'view') }}{% endblock %}
{% block body_content %}
<section class="grid place-items-center h-screen">
<div class="container px-5 py-2 mx-auto lg:px-32">
<p>{{ 'view.error.text'|trans({}, 'view') }} {{statusCode}}</p>
<p>{{message}}</p>
</div>
</section>
{% endblock %}

View File

@ -1,13 +0,0 @@
{% form_theme form _self %}
{% block form_errors %}
{% if errors is defined and errors.count > 0 %}
<div class="bg-red-400 mb-5 p-5 rounded">
<p id="{{form.vars.id}}" >
{% for error in errors %}
{{ error.message | trans({}, 'form', app.request.session.get('_locale')) }}<br />
{% endfor %}
</p>
</div>
{% endif %}
{% endblock form_errors %}

View File

@ -1,88 +0,0 @@
{% extends 'base.html.twig' %}
{% form_theme form 'form/error_theme.html.twig' %}
{% block stylesheets %}
{{ parent() }}
{% endblock %}
{% block title %}{{ 'view.login.title'|trans({}, 'view', app.request.session.get('_locale')) }}{% endblock %}
{% block body_content %}
{% set lang = app.request.session.get('_locale') is defined and app.request.session.get('_locale') is not null ? app.request.session.get('_locale') : app.request.server.get('DEFAULT_LOCALE') %}
<div class="container mx-auto">
<div id="headercontainer">
<div id="langcontainer" class="flex justify-around">
{% for locale in locales %}
<a href="{{ asset(path('locale_change', {'locale':locale })) }}" title="{{locale}}" aria-label="{{locale}}"><img class="w-10" src="{{ asset('flags/'~ locale ~'.svg') }}"/></a>
{% endfor %}
</div>
<div id="titlecontainer" class="text-center p-5">
{% if loginRequestInfo.client.logo_uri is not empty %}
<img class="mx-auto" style="width:150px" src="{{ loginRequestInfo.client.logo_uri }}" alt="user image" />
{% endif %}
<h1 class="font-medium leading-tight text-5xl">{{ loginRequestInfo.client.client_name }}</h1>
</div>
<div id="subtitlecontainer">
<h2 class="font-medium leading-tight text-3xl mt-0 mb-5 text-center">{{ 'view.login.call_to_action'|trans({}, 'view', app.request.session.get('_locale')) }}</h2>
</div>
<div id="flashcontainer">
{% block flash %}
{% for type, alert in {error: 'bg-red-400', danger: 'bg-red-400', warning: 'bg-yellow-400', info: 'bg-blue-400', success: 'bg-green-400'} %}
{% for message in app.session.flashBag.get(type) %}
<div class="rounded mb-5 p-5 {{alert}}">
<p role="{{ alert is same as('success') ? 'status' : (alert is same as('danger') or alert is same as ('warning'))? 'alert' : '' }}">
{{ message|raw }}
</p>
</div>
{% endfor %}
{% endfor %}
{% endblock %}
</div>
</div>
<div id="maincontainer">
{{ form_start(form) }}
<div id="formerrorcontainer">
{{ form_errors(form.app) }}
</div>
<div id="choicecontainer">
{% for choice in form.app.vars.choices %}
{% set choice_id = form.app.vars.full_name ~ '[' ~ choice.value ~ ']' %}
{% set label_id = form.app.vars.full_name ~ '-label-' ~ choice.value %}
<div class="choicelogin last:mb-0 mb-5">
<input aria-labelledby="{{label_id}}" type="submit" class="hidden" id="{{ choice_id }}" value="{{ choice.value }}" name="{{form.app.vars.full_name}}" />
<label for="{{ choice_id }}" class="app-item flex flex-row w-full cursor-pointer rounded-lg bg-white shadow-lg">
{% if choice.data.iconUrl %}
<div class="choiceloginlogo w-full h-auto object-cover w-24 rounded-t-lg rounded-r-none rounded-l-lg bg-contain bg-no-repeat bg-center ml-5 mr-2" style="background-image:url('{{ choice.data.iconUrl }}')"></div>
{% endif %}
<div class="choicelogintitle p-6 flex flex-col justify-start w-full">
<h5 class="text-gray-900 text-xl font-medium mb-2">{{ choice.label }}</h5>
<p class="text-gray-700 text-base mb-4">
{{ choice.data.description(lang) }}
</p>
</div>
</label>
</div>
{% endfor %}
</div>
{% do form.app.setRendered %}
<div id="submitcontainer">
{{form_row(form.submit, {'attr' : {'class' : 'btnlogin w-full px-7 py-5 mt-5 bg-sky-500 text-white font-medium text-sm cursor-pointer leading-snug uppercase rounded shadow-md hover:bg-sky-700 hover:shadow-lg focus:bg-sky-900 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-sky-900 active:shadow-lg transition duration-150 ease-in-out'}})}}
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
</div>
{% endblock %}

View File

@ -1,59 +0,0 @@
body {
background-color: #fff !important;
}
.place-items-center {
place-items: normal;
}
#langcontainer{
display:none;
}
.container {
max-width: 1100px;
}
input[type="radio"]:checked ~ .app-item {
--tw-shadow: 0 10px 15px -3px rgb(22 78 99 / 0.3), 0 4px 6px -4px rgb(22 78 99 / 0.3);
background-color: rgba(240, 240, 240, 0.507);
}
#choicecontainer {
display: flex;
flex-wrap: wrap;
}
.choicelogin {
flex: 1 1 33.333333%;
padding: 10px;
height: 350px;
}
.app-item {
height:100%;
display: flex;
flex-wrap: wrap;
text-align: center;
background-color: #ecf0f1;
}
.app-item > * {
flex: 1 1 100%;
}
.object-cover {
height:130px;
margin-top:30px;
}
h2{
font-size: 18px !important;
}
h5 {
font-size:30px !important;
}
#submitcontainer {
display:none;
}

View File

@ -1,19 +0,0 @@
{
"client_id": "nineskeletor",
"client_name": "Nineskeletor",
"client_secret": "changeme",
"grant_types": [
"authorization_code",
"refresh_token"
],
"jwks": {},
"metadata": {},
"token_endpoint_auth_method": "client_secret_post",
"post_logout_redirect_uris": ["http://localhost:8080"],
"redirect_uris": ["http://localhost:8080/oauth2/callback"],
"response_types": [
"code"
],
"logo_uri": "http://localhost:8080/minio/logo",
"scope": "openid"
}

View File

@ -1,67 +0,0 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
# include /etc/nginx/conf.d/*.conf;
upstream minio {
server minio1:9000;
server minio2:9000;
server minio3:9000;
server minio4:9000;
}
server {
listen 9000;
server_name localhost;
# To allow special characters in headers
ignore_invalid_headers off;
# Allow any size file to be uploaded.
# Set to a value such as 1000m; to restrict file size to a specific value
client_max_body_size 0;
# To disable buffering
proxy_buffering off;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 300;
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
proxy_http_version 1.1;
proxy_set_header Connection "";
chunked_transfer_encoding off;
proxy_pass http://minio;
}
}
}

View File

@ -1,22 +0,0 @@
#!/bin/bash
set -e
set -u
function create_user_and_database() {
local database=$1
echo " Creating user and database '$database'"
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER $database;
CREATE DATABASE $database;
GRANT ALL PRIVILEGES ON DATABASE $database TO $database;
EOSQL
}
if [ -n "$POSTGRES_MULTIPLE_DATABASES" ]; then
echo "Multiple database creation requested: $POSTGRES_MULTIPLE_DATABASES"
for db in $(echo $POSTGRES_MULTIPLE_DATABASES | tr ',' ' '); do
create_user_and_database $db
done
echo "Multiple databases created"
fi

View File

@ -1,19 +0,0 @@
FROM redis:6-alpine
ENV SENTINEL_QUORUM 2
ENV SENTINEL_DOWN_AFTER 1000
ENV SENTINEL_FAILOVER 1000
RUN mkdir -p /redis
WORKDIR /redis
COPY sentinel.conf .
COPY sentinel-entrypoint.sh /usr/local/bin/
RUN chown redis:redis /redis/* && \
chmod +x /usr/local/bin/sentinel-entrypoint.sh
EXPOSE 26379
ENTRYPOINT ["sentinel-entrypoint.sh"]

View File

@ -1,7 +0,0 @@
#!/bin/sh
sed -i "s/\$SENTINEL_QUORUM/$SENTINEL_QUORUM/g" /redis/sentinel.conf
sed -i "s/\$SENTINEL_DOWN_AFTER/$SENTINEL_DOWN_AFTER/g" /redis/sentinel.conf
sed -i "s/\$SENTINEL_FAILOVER/$SENTINEL_FAILOVER/g" /redis/sentinel.conf
redis-server /redis/sentinel.conf --sentinel

View File

@ -1,9 +0,0 @@
port 26379
dir /tmp
sentinel resolve-hostnames yes
sentinel monitor redismaster redis-master 6379 $SENTINEL_QUORUM
sentinel down-after-milliseconds redismaster $SENTINEL_DOWN_AFTER
sentinel parallel-syncs redismaster 1
sentinel failover-timeout redismaster $SENTINEL_FAILOVER

View File

@ -1,11 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://raw.githubusercontent.com/ory/k8s/v0.30.0/helm/charts/hydra-maester/crds/crd-oauth2clients.yaml
- https://forge.cadoles.com/CadolesKube/c-kustom//base/cloudnative-pg-operator?ref=develop
- https://forge.cadoles.com/CadolesKube/c-kustom//base/redis?ref=develop
- https://forge.cadoles.com/CadolesKube/c-kustom//base/minio?ref=develop
- https://forge.cadoles.com/CadolesKube/c-kustom//base/metallb?ref=develop
- https://forge.cadoles.com/CadolesKube/c-kustom//base/metrics?ref=develop
- https://forge.cadoles.com/CadolesKube/c-kustom//base/nginx?ref=develop

View File

@ -1,7 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: metallb-system
resources:
- ./resources/ipaddresspoool.yaml
- ./resources/advertise.yaml

View File

@ -1,9 +0,0 @@
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: l2-ip-pool-ad
namespace: metallb-system
spec:
ipAddressPools:
- main-pool

View File

@ -1,8 +0,0 @@
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: main-pool
namespace: metallb-system
spec:
addresses:
- 172.23.10.100-172.23.10.200

View File

@ -1,48 +0,0 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
name: nineskeletor
networking:
podSubnet: "10.110.0.0/16"
serviceSubnet: "10.115.0.0/16"
nodes:
- role: control-plane
image: kindest/node:v1.27.2
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 31000
hostPort: 31000
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
- containerPort: 80
hostPort: 8080
listenAddress: "0.0.0.0" # Optional, defaults to "0.0.0.0"
labels:
ingress-ready: true
- role: worker
image: kindest/node:v1.27.2
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=2Gi
- role: worker
image: kindest/node:v1.27.2
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=2Gi
- role: worker
image: kindest/node:v1.27.2
kubeadmConfigPatches:
- |
kind: JoinConfiguration
nodeRegistration:
kubeletExtraArgs:
system-reserved: memory=2Gi

View File

@ -1,8 +0,0 @@
---
nameReference:
- kind: Secret
fieldSpecs:
- path: spec/superuserSecret/name
kind: Cluster
- path: spec/bootstrap/initdb/secret/name
kind: Cluster

View File

@ -1,32 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
generatorOptions:
disableNameSuffixHash: true
configurations:
- ./configurations/cnpg-cluster.yaml
resources:
- ./resources/app-cnpg-cluster.yaml
secretgenerator:
- name: postgres-admin
type: secret
literals:
- username=postgres
- password=notsosecret
- name: postgres-user
type: Secret
literals:
- username=app
- password=NotSoSecretButThisIsBad
vars:
- name: POSTGRES_DATABASE_SERVICE_NAME
objref:
name: postgres
kind: Cluster
apiVersion: postgresql.cnpg.io/v1
fieldref:
fieldpath: metadata.name

View File

@ -1,17 +0,0 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgres
spec:
instances: 3
primaryUpdateStrategy: unsupervised
superuserSecret:
name: postgres-admin
bootstrap:
initdb:
database: app
owner: app
secret:
name: postgres-user
storage:
size: 20Gi

View File

@ -1,10 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
components:
- components/app-cnpg
resources:
- resources/app
- resources/minio
- resources/redis

View File

@ -1,26 +0,0 @@
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
io.kompose.service: adminer
name: adminer
spec:
selector:
matchLabels:
io.kompose.service: adminer
replicas: 1
template:
metadata:
labels:
io.kompose.service: adminer
spec:
containers:
- name: adminer
image: reg.cadoles.com/afornerot/adminer
imagePullPolicy: "Always"
env:
- name: ADMINER_DESIGN
value: "pappu687"
ports:
- containerPort: 80
resources: {}

View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: adminer
name: adminer
spec:
type: ClusterIP
ports:
- name: adminer
port: 8080
targetPort: 80
selector:
io.kompose.service: adminer

View File

@ -1,6 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- adminer-deployment.yaml
- adminer-service.yaml

View File

@ -1,90 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: app
name: app
spec:
replicas: 3
selector:
matchLabels:
io.kompose.service: app
strategy:
type: Recreate
template:
metadata:
labels:
io.kompose.service: app
spec:
restartPolicy: Always
containers:
- image: reg.cadoles.com/afornerot/nineskeletor
imagePullPolicy: Always
name: app-php-fpm
args: ["/usr/sbin/php-fpm81", "-F", "-e"]
resources: {}
env:
- name: PHP_FPM_LISTEN
value: 127.0.0.1:9000
- name: PHP_MEMORY_LIMIT
value: 128m
- name: PHP_FPM_MEMORY_LIMIT
value: 128m
- name: PHP_FPM_LOG_LEVEL
value: warning
- name: POSTGRES_DATABASE_SERVICE_NAME
value: $(POSTGRES_DATABASE_SERVICE_NAME)-rw
- name: POSTGRES_DATABASE_USERNAME
valueFrom:
secretKeyRef:
name: postgres-user
key: username
- name: POSTGRES_DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: postgres-user
key: password
- name: DATABASE_URL
value: "postgresql://$(POSTGRES_DATABASE_USERNAME):$(POSTGRES_DATABASE_PASSWORD)@$(POSTGRES_DATABASE_SERVICE_NAME)-rw:5432/app"
- name: REDIS_HOST
value: rfs-$(REDIS_SERVICE_NAME)
- name: REDIS_PORT
value: "26379"
- name: MINIO_SERVICE_NAME
value: $(MINIO_SERVICE_NAME)
- name: MINIO_URL
value: "http://$(MINIO_SERVICE_NAME):9000"
- name: MINIO_KEY
valueFrom:
secretKeyRef:
name: minio-secret
key: minio-root-user
- name: MINIO_SECRET
valueFrom:
secretKeyRef:
name: minio-secret
key: minio-root-password
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "/app/bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration && /app/bin/console app:Init"]
- image: reg.cadoles.com/afornerot/nineskeletor
imagePullPolicy: Always
name: app-nginx
args: ["/usr/sbin/nginx"]
env:
- name: NGINX_APP_UPSTREAM_BACKEND_SERVER
value: 127.0.0.1:9000
- name: NGINX_APP_ROOT
value: "/public"
- name: NGINX_APP_PHP_INDEX
value: "/index.php"
- name: NGINX_ERROR_LOG_LEVEL
value: "warn"
- name: NGINX_APP_PHP_NON_FILE_PATTERN
value: "^/index\\.php(/|$)"
ports:
- containerPort: 8080
resources: {}

View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: app
name: app
spec:
type: ClusterIP
ports:
- name: app
port: 8080
targetPort: 8080
selector:
io.kompose.service: app

View File

@ -1,6 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- app-service.yaml
- app-deployment.yaml

View File

@ -1,23 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- minio-persistentvolumeclaim.yaml
- minio-deployment.yaml
- minio-service.yaml
- minio-tenant.yaml
secretGenerator:
- name: minio-secret
literals:
- "minio-root-user=minio"
- "minio-root-password=minio123"
vars:
- name: MINIO_SERVICE_NAME
objref:
name: minio
apiVersion: minio.min.io/v2
kind: Tenant
fieldref:
fieldpath: metadata.name

View File

@ -1,44 +0,0 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: minio
labels:
io.kompose.service: minio
spec:
replicas: 3
selector:
matchLabels:
io.kompose.service: minio
template:
metadata:
labels:
io.kompose.service: minio
spec:
containers:
- name: minio
image: reg.cadoles.com/proxy_cache/minio/minio
command: ["minio"]
args: ["server", "/data"]
ports:
- name: web-ui
containerPort: 9000
volumeMounts:
- name: minio-data
mountPath: /data
resources: {}
env:
- name: MINIO_ROOT_USER
valueFrom:
secretKeyRef:
name: minio-secret
key: minio-root-user
- name: MINIO_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: minio-secret
key: minio-root-password
volumes:
- name: minio-data
persistentVolumeClaim:
claimName: minio-data

Some files were not shown because too many files have changed in this diff Show More