fixed the pbm of wp cron job not working
This commit is contained in:
@@ -12,6 +12,18 @@ RESET="\e[0m"
|
||||
|
||||
# it gets the ENV variables from .env because specified in the docker-compose.yml file
|
||||
|
||||
|
||||
# this is to make the wp_cron job works
|
||||
# ! it might not be a very strong solution
|
||||
#
|
||||
# somehow it didn't work if the local adress is not accessible from inside the wordpress container :
|
||||
# if : `curl <PROJECT_URL>` don't work, the cron job does not either (why ?)
|
||||
# to make it work, i mapped the docker network gateway ip to the url (without understanding what i'm doing)
|
||||
# the default network is named bridge, and it's gateway is 172.17.0.1 : https://docs.docker.com/network/network-tutorial-standalone/
|
||||
# also might help, even though i didn't use, it helped me find the ip 172.17.0.1 : https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach?rq=2
|
||||
echo "172.17.0.1 ${PROJECT_URL}" >> /etc/hosts
|
||||
|
||||
|
||||
# install wordpress with cli : https://make.wordpress.org/cli/handbook/how-to-install/
|
||||
# commands : https://developer.wordpress.org/cli/commands/
|
||||
# bug with wp commands : https://github.com/wp-cli/config-command/issues/31
|
||||
|
||||
Reference in New Issue
Block a user