This commit is contained in:
2024-09-17 14:02:17 +02:00
commit 111fac9a42
2886 changed files with 189561 additions and 0 deletions

63
scripts/.env.model Normal file
View File

@ -0,0 +1,63 @@
# Symfony
APP_ENV=PROD
APP_SECRET=changemeinenvlocal
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
# Basic
APP_WEBURL=
APP_MASTERIDENTITY=LDAP
APP_AUTH=MYSQL
APP_ALIAS=
APP_NAME=
APP_CRON=1
APP_MASTERURL=
APP_MASTERKEY=
# BDD
DATABASE_NAME=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_HOST=
# MAIL sendmail / smtp
MAILER_METHOD=sendmail
MAILER_URL=
MAILER_NOREPLY=noreply@noreply.fr
# LDAP
LDAP_MODEL=open
LDAP_HOST=
LDAP_PORT=
LDAP_USER=
LDAP_PASSWORD=
LDAP_BASEDN=
LDAP_USERNAME=uid
LDAP_FIRSTNAME=givenname
LDAP_LASTNAME=sn
LDAP_EMAIL=mail
LDAP_ADMINS='["admin"]'
# If APP_AUTH = CAS
CAS_HOST=
CAS_PORT=
CAS_PATH=
CAS_USERNAME=username
CAS_EMAIL=email
CAS_LASTNAME=lastname
CAS_FIRSTNAME=firstname
# Proxy
PROXY_USE=0
PROXY_HOST=
PROXY_PORT=
# Sonde statistic
SONDE_USE=0
SONDE_URL=

0
scripts/.gitkeep Normal file
View File

11
scripts/cron.sh Executable file
View File

@ -0,0 +1,11 @@
#!/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)
# Executer la tache cron
php bin/console app:Cron --env=prod

10
scripts/mail.sh Executable file
View File

@ -0,0 +1,10 @@
#!/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)
# Envoyer les mail
php bin/console swiftmailer:spool:send --message-limit=100 --time-limit=10 --transport app.sendmail.transport

19
scripts/perm.sh Executable file
View File

@ -0,0 +1,19 @@
#!/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)
# Définir le group propriétaire
group=$2
if [ -z $group ]
then
group=$1
fi
# Placer les permissions
sudo chown $1:$group ${DIR} -R
sudo chmod +w ${DIR} -R
sudo chmod g+rw ${DIR} -R

41
scripts/reconfigure.sh Executable file
View File

@ -0,0 +1,41 @@
#!/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
# 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
# Replace de l'alias dans le entrypoint
sed -i 's/\/myfolio\//\/'$APP_ALIAS'\//g' $DIR/public/build/*.*
# Installation des dépendances composer
echo COMPOSER = Install
composer install --quiet
php bin/console app:AppInit --env=prod
php bin/console app:CronInit --env=prod
php bin/console app:Script --env=prod
# Permissions
echo PERMISSIONS
./scripts/perm.sh www-data
echo

BIN
scripts/wkhtmltopdf/wkhtmltoimage Executable file

Binary file not shown.

BIN
scripts/wkhtmltopdf/wkhtmltopdf Executable file

Binary file not shown.