Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs #98

Open
JeroenBoersma opened this issue Jun 17, 2019 · 4 comments
Open

Update docs #98

JeroenBoersma opened this issue Jun 17, 2019 · 4 comments

Comments

@JeroenBoersma
Copy link
Owner

What should be in the docs, rewrite the current docs, implement readthedocs.io, create sections

@RenanLazarotto
Copy link

Hey Jeroen! Please allow me to ask for one thing: don't forget to put in the documentation a reminder that you have to add your user to the docker group. I consider this important because I always forget about it and I keep asking myself why the dev commands asks for my password =)

I was just about to open an issue about this when I remembered that you should manually do that after installing your docker stack. Or you could consider adding this to the bin/dev setup command, so it does it automatically.

@julienloizelet
Copy link
Contributor

julienloizelet commented Sep 1, 2019

Hi @JeroenBoersma , I am currently using this docker-compose-development repo to work with Magento 2 (thanks for sharing with us!). Maybe it is not a good idea to have a specific Magento 2 section but, if it has a sense for you, here is what I found while digging in the Magento 2 related closed issues :

  1. Install globally with :
dev composer global require mage2tv/magento-cache-clean
  1. Add this in your aliases file (e.g ~/.bash_aliases or ~/.zshrc) :
cache-clean.js () {
     dev php /data/.composer/vendor/mage2tv/magento-cache-clean/bin/generate-cache-clean-config.php
     dev node /data/.composer/vendor/mage2tv/magento-cache-clean/bin/cache-clean.js "$@"
}
  1. Run cache-clean.js --watch in your Magento 2 root.
  1. Create the VCL file :
dev php bin/magento varnish:vcl:generate --backend-host=web --backend-port=80 > varnish.vcl
  1. Remove the probe with:
dev varnish-vcl-import varnish.vcl
  1. (Optional) To disable Varnish (i.e renames file from varnish.vcl to varnish.vcl.off ) run :
dev varnish-vcl-disable

For additional infos about Varnish and Magento 2 : #113

@peterjaap
Copy link
Collaborator

Don't forget to set the correct http cache host;

VARNISH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps | grep varnish | cut -d ' ' -f1))
bin/magento setup:config:set --http-cache-hosts="$VARNISH_IP:80"

@IJOL IJOL mentioned this issue Sep 13, 2021
@IJOL
Copy link

IJOL commented Sep 15, 2021

Don't forget to set the correct http cache host;

VARNISH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps | grep varnish | cut -d ' ' -f1))
bin/magento setup:config:set --http-cache-hosts="$VARNISH_IP:80"

I think this advice maybe ill, i've followed julien's advice in #113 (comment) and AFAIK its the correct one, the ip need is that from the ssl container not the varnish one so grep for ssl instead:

VARNISH_IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps | grep ssl | cut -d ' ' -f1)) bin/magento setup:config:set --http-cache-hosts="$VARNISH_IP:80"

for those like me stumbled lately with this issue and have managed to follow all the recipes... ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants