Default localhost for cronmanager in docker environments #2214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a logical issue since the beginning of the cronmanager implementation in #306
It only affects installations which are using docker and keep the base_url at localhost and a different port then 80. It's quite simple (e.g.
$config['base_url'] = 'http://localhost:8086/';
)localhost
inside the container !==localhost
in the host machine.Reason is that we use port
8086
per default in our docker-compose.yml. This leads into the problem that the mastercron is correctly called inside the container withhttp://localhost[:80]
(see Dockerfile) but the cron/run method getshttp://localhost:8086
from the base_url config (via local_url() method). This obvisouly fails inside the container as in this little cute blue whale Wavelog is running on port80
, and not8086
.There was a good solution around a year ago by @winnieXY in #795 but the people (and myself) forget about the config option. Therefore we use now
http://localhost[:80]
by default in docker environments which always works (because inside the container Wavelog always runs on localhost port 80). Thanks to @blhoward2 for poking me here. Even this is not a bug, it leads into a bad user experience when people running Wavelog in docker for the first time on their local machine and the cronmanager fails...Solves