Skip to content

MCLOUD-6428: Issue with varnish cache(http urls are not caching) - Magento2 docker setup #236

Closed
@nithincninan

Description

@nithincninan

https://jira.corp.magento.com/browse/MCLOUD-6428:
Hi Team,

Issue Description:

I have set up the docker on my mac machine( (Magento Commerce version - 2.3.3) and follow the installation steps mentioned in devdocs ( Docker developer mode - https://devdocs.magento.com/cloud/docker/docker-mode-developer.html ).

When we run the docker:compose command (./vendor/bin/ece-docker build:compose --mode="developer" --sync-engine="docker-sync"). It will create containers like db, fpm, web , varnish, redis etc:--

Once we run the command docker-compose run deploy magento-command setup:config:set --http-cache-hosts=varnish. It will create “http-cache-hosts=varnish” to env.php file. And if we check the “full page cache setting” we can see the the caching application setting is “Varnish cache“ in Admin.

Then if we use with https://magento2.docker/ the site is loading fast. But when we try with http(http://magento2.docker/) it is taking 2-3 seconds to load and it does not cache the site. Please let me know if we miss any settings or we have to add any customization.

Please note we use docker-sync to sync files from container to host. Then add the sync-statery to “unison” in docker-sync.yml file: sync_strategy: 'unison'.then run docker-sync start command, it will run in background , which will sync file from container to host

Steps to reproduce:
Magento2 docker step we followed:

Expected and actual results

Expected Results: If we try with https://magento2.docker/ and http://magento2.docker/ the site will load very fast.

Actual Result: If we use with https://magento2.docker/ the site is loading fast. But when we try with http url (http://magento2.docker/) it is taking 2-3 seconds to load the page(varnish cache is not taking here).

Thanks!
Nithin Ninan

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions