wip trying to create debug folder
This commit is contained in:
5
Makefile
5
Makefile
@@ -33,11 +33,12 @@ SOURCE_ENV := . $(ENV_PATH)
|
|||||||
# list of volumes
|
# list of volumes
|
||||||
VOLUME_ENV := set | grep "^HOST_VOLUME_" | cut -d "=" -f 2
|
VOLUME_ENV := set | grep "^HOST_VOLUME_" | cut -d "=" -f 2
|
||||||
VOLUMES_D = $(shell $(SOURCE_ENV) ; $(VOLUME_ENV) )
|
VOLUMES_D = $(shell $(SOURCE_ENV) ; $(VOLUME_ENV) )
|
||||||
ERASE_VOLUMES_D = $(shell $(SOURCE_ENV) ; echo $$HOST_VOLUMES_DIR )
|
PARENT_VOLUMES_D = $(shell $(SOURCE_ENV) ; echo $$HOST_VOLUMES_DIR )
|
||||||
VOLUME_PLUGINS_D = $(shell $(SOURCE_ENV) ; echo $$HOST_VOLUME_PLUGINS )
|
VOLUME_PLUGINS_D = $(shell $(SOURCE_ENV) ; echo $$HOST_VOLUME_PLUGINS )
|
||||||
# url for wordpress, use in makefile to change local
|
# url for wordpress, use in makefile to change local
|
||||||
WP_URL = $(shell $(SOURCE_ENV) ; echo $$WP_URL )
|
WP_URL = $(shell $(SOURCE_ENV) ; echo $$WP_URL )
|
||||||
WP_COMPLETE_URL = $(shell $(SOURCE_ENV) ; echo $$WP_COMPLETE_URL )
|
WP_COMPLETE_URL = $(shell $(SOURCE_ENV) ; echo $$WP_COMPLETE_URL )
|
||||||
|
# error logs
|
||||||
|
|
||||||
# list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
|
# list of running containers, see : https://stackoverflow.com/questions/10024279/how-to-use-shell-commands-in-makefile
|
||||||
RUNNING = $(shell docker ps -q)
|
RUNNING = $(shell docker ps -q)
|
||||||
@@ -132,7 +133,7 @@ re: fclean all
|
|||||||
# !! remove everything, also local volumes
|
# !! remove everything, also local volumes
|
||||||
# execpt the plugin volume
|
# execpt the plugin volume
|
||||||
erase_volume:
|
erase_volume:
|
||||||
- rm -rf $(ERASE_VOLUMES_D)
|
- rm -rf $(PARENT_VOLUMES_D)
|
||||||
erase: fclean erase_volume
|
erase: fclean erase_volume
|
||||||
new: erase all
|
new: erase all
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- wp_volume:${WP_VOLUME_DIR}
|
- wp_volume:${WP_VOLUME_DIR}
|
||||||
- wp_plugins:${WP_VOLUME_PLUGINS}
|
- wp_plugins:${WP_VOLUME_PLUGINS}
|
||||||
|
- error_logs:${ERRORS_LOGS_VOLUME}
|
||||||
build:
|
build:
|
||||||
context: ./requirements/wordpress
|
context: ./requirements/wordpress
|
||||||
args:
|
args:
|
||||||
@@ -97,6 +98,12 @@ volumes:
|
|||||||
type: none
|
type: none
|
||||||
o: "bind"
|
o: "bind"
|
||||||
device: ${HOST_VOLUME_PLUGINS}
|
device: ${HOST_VOLUME_PLUGINS}
|
||||||
|
error_logs:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: none
|
||||||
|
o: "bind"
|
||||||
|
device: ${HOST_VOLUME_ERROR_LOGS}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
inception:
|
inception:
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ PROJECT_PORT=443
|
|||||||
SERVER_EXECUTION_TIME=300
|
SERVER_EXECUTION_TIME=300
|
||||||
SERVER_MAX_UPLOAD_SIZE=512
|
SERVER_MAX_UPLOAD_SIZE=512
|
||||||
|
|
||||||
|
ERRORS_LOGS_VOLUME=/var/log
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# NGINX SETUP
|
# NGINX SETUP
|
||||||
@@ -44,7 +46,7 @@ WP_ADMIN_EMAIL=admin@email.fr
|
|||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
# VOLUMES
|
# LOCAL VOLUMES
|
||||||
|
|
||||||
# if you want to get the home directory you can use $(HOME)
|
# if you want to get the home directory you can use $(HOME)
|
||||||
# however, this will not give the same result if you use sudo, ex :
|
# however, this will not give the same result if you use sudo, ex :
|
||||||
@@ -85,5 +87,7 @@ HOST_VOLUME_WP=${HOST_VOLUMES_DIR}/wp_volume
|
|||||||
HOST_VOLUME_DB=${HOST_VOLUMES_DIR}/db_volume
|
HOST_VOLUME_DB=${HOST_VOLUMES_DIR}/db_volume
|
||||||
# we put the plugin folder inside the parent folder of the docker dir
|
# we put the plugin folder inside the parent folder of the docker dir
|
||||||
HOST_VOLUME_PLUGINS=${HOST_DOCKER_PARENT_PATH}/plugins
|
HOST_VOLUME_PLUGINS=${HOST_DOCKER_PARENT_PATH}/plugins
|
||||||
|
# error log
|
||||||
|
HOST_VOLUME_ERROR_LOGS=${HOST_VOLUMES_DIR}/error_logs
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -75,8 +75,8 @@ echo -e ${YELLOW}configuring the error logs...${RESET}
|
|||||||
# Enable WP_DEBUG mode
|
# Enable WP_DEBUG mode
|
||||||
php wp-cli.phar config set WP_DEBUG true --raw --path=${WP_VOLUME_DIR}
|
php wp-cli.phar config set WP_DEBUG true --raw --path=${WP_VOLUME_DIR}
|
||||||
# Enable Debug logging to a file (if set to true, this is the /wp-content/debug.log file)
|
# Enable Debug logging to a file (if set to true, this is the /wp-content/debug.log file)
|
||||||
php wp-cli.phar config set WP_DEBUG_LOG '/var/log/tmp_errors.log' --path=${WP_VOLUME_DIR}
|
#php wp-cli.phar config set WP_DEBUG_LOG '/var/log/tmp_errors.log' --path=${WP_VOLUME_DIR}
|
||||||
#php wp-cli.phar config set WP_DEBUG_LOG true --raw --path=${WP_VOLUME_DIR}
|
php wp-cli.phar config set WP_DEBUG_LOG "${ERRORS_LOGS_VOLUME}/wp_error.log" --path=${WP_VOLUME_DIR}
|
||||||
# Disable display of errors and warnings
|
# Disable display of errors and warnings
|
||||||
php wp-cli.phar config set WP_DEBUG_DISPLAY false --raw --path=${WP_VOLUME_DIR}
|
php wp-cli.phar config set WP_DEBUG_DISPLAY false --raw --path=${WP_VOLUME_DIR}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user