wip trying to get better volume controle and an error log volume

This commit is contained in:
asus
2024-02-07 10:31:42 +01:00
parent 217b20e7ae
commit 846a41063e
5 changed files with 56 additions and 11 deletions

View File

@@ -63,7 +63,6 @@ services:
volumes:
- wp_volume:${WP_VOLUME_DIR}
- wp_plugins:${WP_VOLUME_PLUGINS}
- error_logs:${ERRORS_LOGS_VOLUME}
build:
context: ./requirements/wordpress
args:
@@ -98,12 +97,12 @@ volumes:
type: none
o: "bind"
device: ${HOST_VOLUME_PLUGINS}
error_logs:
driver: local
driver_opts:
type: none
o: "bind"
device: ${HOST_VOLUME_ERROR_LOGS}
# error_logs:
# driver: local
# driver_opts:
# type: none
# o: "bind"
# device: ${HOST_VOLUME_ERROR_LOGS}
networks:
inception:

View File

@@ -8,7 +8,7 @@ PROJECT_PORT=443
SERVER_EXECUTION_TIME=300
SERVER_MAX_UPLOAD_SIZE=512
ERRORS_LOGS_VOLUME=/var/log
#ERRORS_LOGS_VOLUME=/var/log
# ----------------------------------------------------------------------
@@ -88,6 +88,6 @@ HOST_VOLUME_DB=${HOST_VOLUMES_DIR}/db_volume
# we put the plugin folder inside the parent folder of the docker dir
HOST_VOLUME_PLUGINS=${HOST_DOCKER_PARENT_PATH}/plugins
# error log
HOST_VOLUME_ERROR_LOGS=${HOST_VOLUMES_DIR}/error_logs
#HOST_VOLUME_ERROR_LOGS=${HOST_VOLUMES_DIR}/error_logs

View File

@@ -75,8 +75,8 @@ 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 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 "${ERRORS_LOGS_VOLUME}/wp_error.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
php wp-cli.phar config set WP_DEBUG_DISPLAY false --raw --path=${WP_VOLUME_DIR}