1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2025-03-31 13:16:19 -03:00
parent b6d60e0641
commit 7b90fa95a7

View file

@ -133,8 +133,15 @@ echo "Deny from all" > /var/www/html/AVideo/.compose/.htaccess
echo "entrypoint -- Running updatedb script..." echo "entrypoint -- Running updatedb script..."
cd /var/www/html/AVideo/install && php updatedb.php cd /var/www/html/AVideo/install && php updatedb.php
echo "entrypoint -- install database ..." echo "entrypoint -- Checking if database '${DB_MYSQL_NAME}' exists..."
cd /var/www/html/AVideo/Encoder/ && git pull && cd install && php install.php https://${SERVER_NAME} "${DB_MYSQL_USER}" "${DB_MYSQL_PASSWORD}" "${SYSTEM_ADMIN_PASSWORD}" "${DB_MYSQL_NAME}" "https://${SERVER_NAME}/Encoder/" "${DB_MYSQL_HOST}" "${DB_MYSQL_PORT}" if ! mysql -h "${DB_MYSQL_HOST}" -u "${DB_MYSQL_USER}" -p"${DB_MYSQL_PASSWORD}" -e "USE ${DB_MYSQL_NAME};" 2>/dev/null; then
echo "entrypoint -- Database '${DB_MYSQL_NAME}' does not exist. Deleting configuration.php"
rm -f /var/www/html/AVideo/Encoder/configuration.php
echo "entrypoint -- install database ..."
cd /var/www/html/AVideo/Encoder/ && git pull && cd install && php install.php https://${SERVER_NAME} "${DB_MYSQL_USER}" "${DB_MYSQL_PASSWORD}" "${SYSTEM_ADMIN_PASSWORD}" "${DB_MYSQL_NAME}" "https://${SERVER_NAME}/Encoder/" "${DB_MYSQL_HOST}" "${DB_MYSQL_PORT}"
else
echo "entrypoint -- Database '${DB_MYSQL_NAME}' exists. Skipping deletion."
fi
echo "entrypoint -- Running reencodeAllVideos script..." echo "entrypoint -- Running reencodeAllVideos script..."
cd /var/www/html/AVideo/Encoder/install && php reencodeAllVideos.php cd /var/www/html/AVideo/Encoder/install && php reencodeAllVideos.php