Compare commits
2 Commits
ce6d6b442a
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8437099112 | ||
|
|
d2fda4af76 |
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
|||||||
[submodule "srcs/env_generator"]
|
[submodule "srcs/env_generator"]
|
||||||
path = srcs/env_generator
|
path = srcs/env_generator
|
||||||
url = git@bitbucket.org:hugogogo/script_env_generator.git
|
url = gitea@gitea.hugulumu.com:perso/SCRIPT_env_generator.git
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ RESET="\e[0m"
|
|||||||
|
|
||||||
# it gets the ENV variables from .env because specified in the docker-compose.yml file
|
# it gets the ENV variables from .env because specified in the docker-compose.yml file
|
||||||
|
|
||||||
|
|
||||||
# this is to make the wp_cron job works
|
# this is to make the wp_cron job works
|
||||||
# ! it might not be a very strong solution
|
# ! it might not be a very strong solution
|
||||||
#
|
#
|
||||||
@@ -77,7 +76,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# installing plugins :
|
# installing plugins :
|
||||||
echo -e ${YELLOW}installing plugins...${RESET}
|
echo -e ${YELLOW}installing plugins..${RESET}
|
||||||
plugins=$(ls ${WP_VOLUME_PLUGINS})
|
plugins=$(ls ${WP_VOLUME_PLUGINS})
|
||||||
echo $plugins
|
echo $plugins
|
||||||
for dir in $plugins; do
|
for dir in $plugins; do
|
||||||
@@ -96,6 +95,20 @@ php wp-cli.phar config set WP_DEBUG_LOG true --raw --path=${WP_VOLUME_DIR}
|
|||||||
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}
|
||||||
|
|
||||||
|
|
||||||
|
# if you don't want to rely on wpcron :
|
||||||
|
# - because it launches on each visit of the website
|
||||||
|
# - so it can slow it
|
||||||
|
# - instead creates a real cron job to call the wpcron file regularly
|
||||||
|
# launch the server cron job, and disable wpcron
|
||||||
|
# in the container, the crond deamon is started manually, so it is listed with :
|
||||||
|
# - ps aux
|
||||||
|
# - kill <PID> to remove it for example
|
||||||
|
# -> https://stackoverflow.com/questions/37015624/how-to-run-a-cron-job-inside-a-docker-container
|
||||||
|
php wp-cli.phar config set DISABLE_WP_CRON false --raw --path=${WP_VOLUME_DIR}
|
||||||
|
echo "* * * * * cd ${WP_VOLUME_DIR}; php ${WP_VOLUME_DIR}/wp-cron.php > /dev/null 2>&1" >> /etc/crontabs/root
|
||||||
|
crond -f -l 2 >> /var/log/wpcron.log 2>&1 &
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user