nineskeletor/bin/reconfigure.sh

41 lines
782 B
Bash
Raw Normal View History

2022-07-22 15:35:04 +02:00
#!/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
2022-07-29 14:44:52 +02:00
bin/console doctrine:migrations:migrate --no-interaction
bin/console app:Init
2022-08-28 15:13:09 +02:00
bin/console app:Cron
2022-07-22 15:35:04 +02:00
# Permissions
echo PERMISSIONS
./bin/perm.sh www-data
echo