You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nano /usr/local/bin/install-magento2
Change domain from localhost to magento2.local.
Change other settings as you wish e.g. timezone.
Save and Exit nano.
exit that shell.
cd MYMAGENTO2
docker-compose up -d
./shell
rm index.php
install-magento2
Goal: To have this docker run on my existing Traefik/docker which runs on WSL 2 - Ubuntu on WIndows 10
Traefik video talk here: https://youtu.be/RP40Iv_0yvA
Extra goals: See about proxying services such as phpmyadmin, xdebug, live reload, database through these domains.
Rather than forwarding a port Traefik lets you reverse proxy a domain and ports with TLS/certs (optional) to docker containers for example.
Attempting to set this up with Traefik and a magento2.local domain for development of extensions/themes locally.
Assumption Traefik already configured, I'll see about documenting this later.
Assumption Docker WSL 2 Ubuntu Windows 10 build 2004 > already set up.
Add 127.0.0.1 magento2.local to windows host file.
ubuntu curl -s https://raw.githubusercontent.com/clean-docker/Magento2/master/init | bash -s MYMAGENTO2 clone
Edit the docker-compose.yml to change network and add labels as per below.
Install this to speed up docker compose installs and nano to edit install-magento2 script.
docker-compose exec apache bash composer global require hirak/prestissimo apt-get install nano
nano /usr/local/bin/install-magento2
Change domain from localhost to magento2.local.
Change other settings as you wish e.g. timezone.
Save and Exit nano.
exit that shell.
cd MYMAGENTO2 docker-compose up -d ./shell rm index.php install-magento2
Supply repo.magento.com username/pass keys.
These are from
https://marketplace.magento.com/customer/accessKeys/
Answer yes to save details to auth.json?
Y
Getting a lot of cannot create cache directory warnings with a few yellow background I'll assume that it is normal.
Setup is stuck here for now...
Going to leave it running to see if it works, maybe it is just going to take a few hours or something.
docker-compose.yml with Traefik settings applied.
Composer may be install due to xdebug and/or php memory limits....
https://stackoverflow.com/questions/32573924/composer-hanging-while-updating-dependencies
Also on some OS I have had to do this in the past.
sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
https://stackoverflow.com/questions/28436237/why-is-php-composer-so-slow
I left it over lunch and it eventually chugged along.
I can't seem to login to the admin user, maybe I just need to reinstall.
Composer was still slow, logged in as root and updated it.
composer self-update
Disable xdebug on cli? I didn't notice any impact.
It also downloads from http not https.
composer config --global repo.packagist composer https://packagist.org
https://stackoverflow.com/questions/28436237/why-is-php-composer-so-slow
Dev mode
Install sample data.
Supply keys again? dang it does not save them.
Upgrade to apply the sample data changes.
I'll update this ticket/comment with more info later when I come back to attempting this :)
The text was updated successfully, but these errors were encountered: