ninefolio/misc/script/reconfigure.sh

39 lines
1.1 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
set -eo pipefail
# Se positionner sur la racine du projet
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd ${DIR}
cd ../..
DIR=$(pwd)
bin/console d:s:u --force --complete
yarn encore prod
# Asset media de base
mkdir -p /app/public/uploads
mkdir -p /app/public/uploads/logo
mkdir -p /app/public/uploads/image
mkdir -p /app/public/uploads/hero
mkdir -p /app/public/uploads/avatar
chown apache /app/public/uploads
chown apache /app/public/uploads/logo
chown apache /app/public/uploads/image
chown apache /app/public/uploads/hero
chown apache /app/public/uploads/avatar
cp -f /app/public/styles/medias/admin.jpg /app/public/uploads/avatar/
cp -f /app/public/styles/medias/noavatar.png /app/public/uploads/avatar/
cp -f /app/public/styles/medias/system.jpg /app/public/uploads/avatar/
cp -f /app/public/styles/medias/hero.jpg /app/public/uploads/hero/
cp -f /app/public/styles/medias/contact.jpg /app/public/uploads/image/
cp -f /app/public/styles/medias/link.jpg /app/public/uploads/image/
cp -f /app/public/styles/medias/logo.png /app/public/uploads/logo/
bin/console app:AppInit
bin/console app:CronInit
exec $@