svg
This commit is contained in:
77
scripts/.env.model
Normal file
77
scripts/.env.model
Normal file
@@ -0,0 +1,77 @@
|
||||
# In all environments, the following files are loaded if they exist,
|
||||
# the latter taking precedence over the former:
|
||||
#
|
||||
# * .env contains default values for the environment variables needed by the app
|
||||
# * .env.local uncommitted file with local overrides
|
||||
# * .env.$APP_ENV committed environment-specific defaults
|
||||
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
||||
#
|
||||
# Real environment variables win over .env files.
|
||||
#
|
||||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
||||
#
|
||||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
APP_SECRET=52c1cb88ee822cd2643abe29e16a68a6
|
||||
#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)$'
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> symfony/mailer ###
|
||||
# MAILER_DSN=smtp://localhost
|
||||
###< symfony/mailer ###
|
||||
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
# Basic
|
||||
APP_ALIAS=schedule
|
||||
APP_AUTH=MYSQL
|
||||
APP_NAME=Schedule
|
||||
APP_ENV=PROD
|
||||
APP_CRON=true
|
||||
|
||||
# Office hours
|
||||
OFFICE_HOUR_START=09:00
|
||||
OFFICE_HOUR_END=17:30
|
||||
|
||||
# MAIL sendmail / smtp
|
||||
MAILER_METHOD=sendmail
|
||||
MAILER_URL=
|
||||
MAILER_NOREPLY=noreply@noreply.fr
|
||||
MAILER_DEFAULT_NOTIF=
|
||||
|
||||
# BDD
|
||||
DATABASE_NAME=
|
||||
DATABASE_USER=
|
||||
DATABASE_PASSWORD=
|
||||
DATABASE_HOST=
|
||||
|
||||
# If APP_AUTH = CAS
|
||||
CAS_HOST=
|
||||
CAS_PORT=
|
||||
CAS_PATH=
|
||||
CAS_USERNAME=username
|
||||
CAS_EMAIL=email
|
||||
CAS_LASTNAME=lastname
|
||||
CAS_FIRSTNAME=firstname
|
||||
|
||||
## Sentry DSN
|
||||
SENTRY_DSN=
|
||||
|
||||
# Dolibar
|
||||
DOLIBARR_ACTIVE=false
|
||||
DOLIBARR_API_KEY=
|
||||
DOLIBARR_URI=
|
||||
|
||||
###> sentry/sentry-symfony ###
|
||||
SENTRY_DSN=
|
||||
###< sentry/sentry-symfony ###
|
||||
|
||||
###> symfony/swiftmailer-bundle ###
|
||||
# For Gmail as a transport, use: "gmail://username:password@localhost"
|
||||
# For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode="
|
||||
# Delivery is disabled by default via "null://localhost"
|
||||
MAILER_URL=null://localhost
|
||||
###< symfony/swiftmailer-bundle ###
|
0
scripts/.gitkeep
Normal file
0
scripts/.gitkeep
Normal file
13
scripts/checkcomposer.php
Normal file
13
scripts/checkcomposer.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
$requiredVersion = 'version 1'; // La version interdite
|
||||
|
||||
$composerVersion = trim(shell_exec('COMPOSER_ALLOW_SUPERUSER=1 composer --version --no-ansi'));
|
||||
echo $composerVersion."\n";
|
||||
|
||||
if (stripos($composerVersion,$requiredVersion)===false ) {
|
||||
echo "La version de Composer $requiredVersion n'est pas autorisée" . PHP_EOL;
|
||||
echo "Veuillez mettre à jour Composer avec 'composer self-update --1'." . PHP_EOL;
|
||||
echo "Ou executez le scripts/reconfigure.sh" . PHP_EOL;
|
||||
exit(1); // Quitte avec un code d'erreur
|
||||
}
|
4
scripts/cron.sh
Executable file
4
scripts/cron.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/schedule
|
||||
php bin/console app:Cron --env=prod
|
4
scripts/genkey.sh
Executable file
4
scripts/genkey.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
if [ ! -f /var/www/html/schedule/.key ]; then
|
||||
openssl rand -hex 32 > /var/www/html/schedule/.key
|
||||
fi
|
11
scripts/perm.sh
Executable file
11
scripts/perm.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
group=$2
|
||||
if [ -z $group ]
|
||||
then
|
||||
group=$1
|
||||
fi
|
||||
|
||||
sudo chown $1:$group /var/www/html/schedule -R
|
||||
sudo chmod +w /var/www/html/schedule -R
|
||||
sudo chmod g+rw /var/www/html/schedule -R
|
2
scripts/proxy.sh
Normal file
2
scripts/proxy.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
# Si besoin export des valeurs de HTTP_PROXY et HTTPS_PROXY
|
22
scripts/reconfigure.sh
Executable file
22
scripts/reconfigure.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /var/www/html/schedule
|
||||
|
||||
# Déclaration d'un proxy
|
||||
. scripts/proxy.sh
|
||||
|
||||
# Mise en place du fichier d'environnement model
|
||||
yes 2>/dev/null | cp /var/www/html/schedule/scripts/.env.model $DIR/.env
|
||||
|
||||
# Installation des dépendances composer
|
||||
echo COMPOSER = Install
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
composer self-update --1 --quiet
|
||||
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
|
||||
./scripts/perm.sh www-data
|
BIN
scripts/wkhtmltopdf/wkhtmltoimage
Executable file
BIN
scripts/wkhtmltopdf/wkhtmltoimage
Executable file
Binary file not shown.
BIN
scripts/wkhtmltopdf/wkhtmltopdf
Executable file
BIN
scripts/wkhtmltopdf/wkhtmltopdf
Executable file
Binary file not shown.
Reference in New Issue
Block a user