# magento-test #Installation: # Some important information # Some helpful docker commands: # Build all containers - `docker-compose up -d` # Stop all containers - `docker-compose down` # Remove image - `docker image rm php81_apache` # Stop containers, remove image and recreation of container - `docker-compose down && docker image rm php81_apache && docker-compose up -d` # Get into container - `docker exec -it php-8.1-apache /bin/bash` - `docker build -t magento-php .` - `docker image rm magento_php` - `docker ps` - `docker ps --all` - `docker container stop $(docker container ls -aq)` - `docker container rm $(docker container ls -aq)` - `docker rmi $(docker images -q)` - `docker stop spt_tbuddy && docker rm spt_tbuddy && docker rmi spt_tb && docker-compose up -d` - `docker stop magento-test && docker rm magento-test && docker rmi spt_tb && docker-compose up -d` # Some helpful other commands: - Restart Apache within the container - Go into docker container `docker exec -it magento-php /bin/bash` - Apache restart `sudo /etc/init.d/apache2 reload` # Clean restart of Docker instance 1. Stop the container(s) using the following command: `docker-compose down` 2. Delete all containers using the following command: `docker rm -f $(docker ps -a -q)` 3. Delete all volumes using the following command: `docker volume rm $(docker volume ls -q)` 4. Restart the containers using the following command: `docker-compose up -d` # INSTALL MAGENTO via composer - docker Container starten und in den Container wechseln - composer install - "bin/magento install" Befehl: php bin/magento setup:install --base-url="http://127.0.0.1" \ --db-host="magento-mariadb" \ --db-name="magento" \ --db-user="root" \ --db-password="root" \ --admin-firstname="Admin" \ --admin-lastname="Admin" \ --admin-email="re@spawntree.de" \ --admin-user="admin" \ --admin-password="magento2test" \ --use-rewrites="1" \ --backend-frontname="admin" \ --db-prefix=mage_ \ --search-engine=elasticsearch7 \ --elasticsearch-host=elasticsearch \ --elasticsearch-port=9200 # create admin account bin/magento admin:user:create --admin-user=admin --admin-password=admin2spt --admin-email=re@spawntree.de --admin-firstname=Admin --admin-lastname=Administrator # mkdir for volumes mkdir -m 775 elasticsearch_data magento_data mariadb_data mkdir .elasticsearch .mariadb # standard permission magento - do we use it? find . -type d -exec chmod 0711 {} + find . -type f -exec chmod 0644 {} + find . -type f -name “*.php” -exec chmod 600 {} +