- resolve error in makefile new rule

- supress script for wordpress entrypoint when wp is already installed, it was causing error in redirection
This commit is contained in:
asus
2024-02-04 14:45:08 +01:00
parent 91ebf533c3
commit 94e186baf5
2 changed files with 15 additions and 13 deletions

View File

@@ -132,9 +132,9 @@ erase_volume:
- rm -rf $(VOLUMES_D)
erase: erase_volume fclean
- rm -rf $(VOLUMES_D)
new: erase $(NAME)
new: erase all
.PHONY : all $(VOLUMES_D) require build up list clean fclean re erase new require
.PHONY : all logs create_env create_volumes_d add_url_host require build build_logs up down list clean fclean-images fclean-volumes fclean re erase_volume erase new

View File

@@ -62,19 +62,21 @@ then
else
echo -e ${GREEN}wp is installed${RESET}
#https://stackoverflow.com/questions/56344567/wordpress-prevent-redirection-to-main-url
echo -e ${YELLOW}checking config.php file with current url...${RESET}
HOME=$(php wp-cli.phar config get WP_HOME --path=${WP_VOLUME_DIR})
if [ ${HOME} != ${WP_COMPLETE_URL} ] ; then
php wp-cli.phar config set WP_HOME ${WP_COMPLETE_URL} --path=${WP_VOLUME_DIR}
fi
SITEURL=$(php wp-cli.phar config get WP_SITEURL --path=${WP_VOLUME_DIR})
if [ ${SITEURL} != ${WP_COMPLETE_URL} ] ; then
php wp-cli.phar config set WP_SITEURL ${WP_COMPLETE_URL} --path=${WP_VOLUME_DIR}
fi
fi
# https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
echo -e ${YELLOW}configuring the error logs...${RESET}
# Enable WP_DEBUG mode
php wp-cli.phar config set WP_DEBUG true --raw --path=${WP_VOLUME_DIR}
# Enable Debug logging to the /wp-content/debug.log file
#php wp-cli.phar config set WP_DEBUG_LOG /var/log/tmp_errors.log --raw --path=${WP_VOLUME_DIR}
php wp-cli.phar config set WP_DEBUG_LOG true --raw --path=${WP_VOLUME_DIR}
# Disable display of errors and warnings
php wp-cli.phar config set WP_DEBUG_DISPLAY false --raw --path=${WP_VOLUME_DIR}
# exec php-fpm7 -FR
# php-fpm7 --help :