fixed the pbm of wp cron job not working

This commit is contained in:
asus
2024-04-02 11:37:41 +02:00
parent 3c0a32e6ac
commit ce6d6b442a
3 changed files with 18 additions and 3 deletions

View File

@@ -5,7 +5,7 @@
# then install as recommended : curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
# or (neat) : https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
version: "3.8"
#version: "3.8"
services:
# ---------------------------------
@@ -75,6 +75,10 @@ services:
depends_on:
mariadb:
condition: service_healthy
# i was trying to resolve the wp_cron not working, I used the 'crontrol' plugin, it informed me curl didn't work, so i tried in the wordpress docker : 'curl <url of my local website>' and indeed it failed. I finally added this mapping to my /etc/hosts file in the wordpress container '172.17.0.1 <url of my local website>' (but i'm not sure '172.17.0.1' will always work, it seems to be constant for the default bridge network : https://docs.docker.com/network/network-tutorial-standalone/)
# https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach?rq=2
# extra_hosts:
# - "host.docker.internal:host-gateway"
# specify path to named volumes : https://docs.docker.com/compose/compose-file/compose-file-v3/#volume-configuration-reference
# local driver options : https://stackoverflow.com/questions/62232676/docker-local-volume-driver-options
@@ -104,6 +108,7 @@ volumes:
# o: "bind"
# device: ${HOST_VOLUME_ERROR_LOGS}
networks:
local-wp: